| Index: ipc/attachment_broker_win.cc
|
| diff --git a/ipc/attachment_broker_win.cc b/ipc/attachment_broker_win.cc
|
| index 89d193c7326bc13e73c774ae9e4346daa9192518..5d4b74dff250c3a40ea434153d8f616073d8a2fc 100644
|
| --- a/ipc/attachment_broker_win.cc
|
| +++ b/ipc/attachment_broker_win.cc
|
| @@ -41,8 +41,15 @@ bool AttachmentBrokerWin::SendAttachmentToProcess(
|
|
|
| bool AttachmentBrokerWin::GetAttachmentWithId(
|
| BrokerableAttachment::AttachmentId id,
|
| - BrokerableAttachment* attachment) {
|
| - // TODO(erikchen): Implement me. http://crbug.com/493414
|
| + scoped_refptr<BrokerableAttachment>* out_attachment) {
|
| + for (AttachmentVector::iterator it = attachments_.begin();
|
| + it != attachments_.end(); ++it) {
|
| + if ((*it)->GetIdentifier() == id) {
|
| + *out_attachment = *it;
|
| + attachments_.erase(it);
|
| + return true;
|
| + }
|
| + }
|
| return false;
|
| }
|
|
|
| @@ -65,6 +72,7 @@ void AttachmentBrokerWin::OnWinHandleHasBeenDuplicated(
|
| scoped_refptr<BrokerableAttachment> attachment(
|
| new IPC::internal::HandleAttachmentWin(wire_format));
|
| attachments_.push_back(attachment);
|
| + NotifyObservers(attachment->GetIdentifier());
|
| }
|
|
|
| } // namespace IPC
|
|
|