ipc: AttachmentBroker dispatches notifications onto an appropriate thread.
Previously, there were no guarantees about the thread on which an observer of
AttachmentBroker would receive its notifications. Now, the observer is
guaranteed to get a notification on the same thread in which it registered
itself as an observer. This also makes notification of observers asynchronous,
which avoids issues related to re-entrant functions.
BUG=550938
Review URL: https://codereview.chromium.org/1413893005
Cr-Commit-Position: refs/heads/master@{#358392}
diff --git a/ipc/attachment_broker_privileged_win_unittest.cc b/ipc/attachment_broker_privileged_win_unittest.cc
index b0353d6..b5e1e98 100644
--- a/ipc/attachment_broker_privileged_win_unittest.cc
+++ b/ipc/attachment_broker_privileged_win_unittest.cc
@@ -225,7 +225,7 @@
void CommonSetUp() {
if (!broker_.get())
set_broker(new IPC::AttachmentBrokerUnprivilegedWin);
- broker_->AddObserver(&observer_);
+ broker_->AddObserver(&observer_, task_runner());
CreateChannel(&proxy_listener_);
broker_->DesignateBrokerCommunicationChannel(channel());
ASSERT_TRUE(ConnectChannel());