| 608 | }; |
| 609 | |
| 610 | void Connection::QueueResponseForCall(unique_ptr<InboundCall> call) { |
| 611 | // This is usually called by the IPC worker thread when the response |
| 612 | // is set, but in some circumstances may also be called by the |
| 613 | // reactor thread (e.g. if the service has shut down) |
| 614 | |
| 615 | DCHECK_EQ(direction_, SERVER); |
| 616 | |
| 617 | // If the connection is torn down, then the QueueOutbound() call that |
| 618 | // eventually runs in the reactor thread will take care of calling |
| 619 | // ResponseTransferCallbacks::NotifyTransferAborted. |
| 620 | |
| 621 | TransferPayload tmp_slices; |
| 622 | call->SerializeResponseTo(&tmp_slices); |
| 623 | |
| 624 | TransferCallbacks *cb = new ResponseTransferCallbacks(std::move(call), this); |
| 625 | // After the response is sent, can delete the InboundCall object. |
| 626 | // We set a dummy call ID and required feature set, since these are not needed |
| 627 | // when sending responses. |
| 628 | unique_ptr<OutboundTransfer> t( |
| 629 | OutboundTransfer::CreateForCallResponse(tmp_slices, cb)); |
| 630 | |
| 631 | QueueTransferTask *task = new QueueTransferTask(std::move(t), this); |
| 632 | reactor_thread_->reactor()->ScheduleReactorTask(task); |
| 633 | } |
| 634 | |
| 635 | void Connection::set_confidential(bool is_confidential) { |
| 636 | is_confidential_ = is_confidential; |
no test coverage detected