Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: ipc/attachment_broker_privileged_win_unittest.cc

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ipc/attachment_broker_privileged_win_unittest.cc
diff --git a/ipc/attachment_broker_privileged_win_unittest.cc b/ipc/attachment_broker_privileged_win_unittest.cc
index 610921e1039a14202d91a8997e0e3bfb3ce6380f..314252f60fc79a5ab163ba45222cee415b2cd7d1 100644
--- a/ipc/attachment_broker_privileged_win_unittest.cc
+++ b/ipc/attachment_broker_privileged_win_unittest.cc
@@ -220,6 +220,7 @@ class IPCAttachmentBrokerPrivilegedWinTest : public IPCTestBase {
// Takes ownership of |broker|. Has no effect if called after CommonSetUp().
void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) {
broker_.reset(broker);
+ IPC::AttachmentBroker::SetGlobal(broker);
}
void CommonSetUp() {
@@ -424,6 +425,7 @@ int CommonPrivilegedProcessMain(OnMessageReceivedCallback callback,
// Set up IPC channel.
IPC::AttachmentBrokerPrivilegedWin broker;
+ IPC::AttachmentBroker::SetGlobal(&broker);
Tom Sepez 2015/09/11 15:58:30 This goes out of scope while the process is still
erikchen 2015/09/11 20:16:02 I updated the comment to say: """ Each process has
scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
IPCTestBase::GetChannelName(channel_name), &listener, &broker));
broker.RegisterCommunicationChannel(channel.get());
« ipc/attachment_broker.h ('K') | « ipc/attachment_broker.cc ('k') | ipc/ipc_channel_nacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698