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

Unified Diff: ipc/attachment_broker.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: Comments from avi. Created 5 years, 3 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
« no previous file with comments | « ipc/attachment_broker.h ('k') | ipc/attachment_broker_privileged_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker.cc
diff --git a/ipc/attachment_broker.cc b/ipc/attachment_broker.cc
index 7450ec37e43edafbb1b43ed807c1df7b89f7598f..7e04bcd645de09dd4a4a32e3cd8f6198c567926d 100644
--- a/ipc/attachment_broker.cc
+++ b/ipc/attachment_broker.cc
@@ -6,8 +6,23 @@
#include <algorithm>
+namespace {
+IPC::AttachmentBroker* g_attachment_broker = nullptr;
+}
+
namespace IPC {
+// static
+void AttachmentBroker::SetGlobal(AttachmentBroker* broker) {
+ CHECK(!g_attachment_broker);
+ g_attachment_broker = broker;
+}
+
+// static
+AttachmentBroker* AttachmentBroker::GetGlobal() {
+ return g_attachment_broker;
+}
+
AttachmentBroker::AttachmentBroker() {}
AttachmentBroker::~AttachmentBroker() {}
« no previous file with comments | « ipc/attachment_broker.h ('k') | ipc/attachment_broker_privileged_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698