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

Unified Diff: ipc/attachment_broker.h

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.h
diff --git a/ipc/attachment_broker.h b/ipc/attachment_broker.h
index 5b65289393706545e221d7f05b2df9f615b88068..b77700836423782fd2100e269f23f953a6b45697 100644
--- a/ipc/attachment_broker.h
+++ b/ipc/attachment_broker.h
@@ -50,6 +50,11 @@ class IPC_EXPORT AttachmentBroker : public Listener {
const BrokerableAttachment::AttachmentId& id) = 0;
};
+ // Each process has at most one attachment broker. The process is responsible
+ // for ensuring that |broker| stays alive for the life time of the process.
Tom Sepez 2015/09/11 15:58:30 nit: lifetime
erikchen 2015/09/11 20:16:02 I updated the comment to say: """ Each process has
+ static void SetGlobal(AttachmentBroker* broker);
+ static AttachmentBroker* GetGlobal();
+
AttachmentBroker();
~AttachmentBroker() override;

Powered by Google App Engine
This is Rietveld 408576698