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

Unified Diff: ipc/attachment_broker_privileged.h

Issue 1414603003: ipc: Move AttachmentBrokerPrivileged singleton logic into ipc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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.h
diff --git a/ipc/attachment_broker_privileged.h b/ipc/attachment_broker_privileged.h
index 387dbe5c9f77b714ccf08f511fd74c7a1c1c2c95..b2ee01aeb2dc7e3ba9a25ff002f3abb632101a47 100644
--- a/ipc/attachment_broker_privileged.h
+++ b/ipc/attachment_broker_privileged.h
@@ -25,13 +25,10 @@ class IPC_EXPORT AttachmentBrokerPrivileged : public IPC::AttachmentBroker {
AttachmentBrokerPrivileged();
~AttachmentBrokerPrivileged() override;
- // On platforms that support attachment brokering, returns a new instance of
- // a platform-specific attachment broker. Otherwise returns |nullptr|.
- // The caller takes ownership of the newly created instance, and is
- // responsible for ensuring that the attachment broker lives longer than
- // every IPC::Channel. The new instance automatically registers itself as the
- // global attachment broker.
- static scoped_ptr<AttachmentBrokerPrivileged> CreateBroker();
+ // If there is no global attachment broker, makes a new
+ // AttachmentBrokerPrivileged and sets it as the global attachment broker.
+ // This method is thread safe.
+ static void CreateBrokerIfNeeded();
// AttachmentBroker overrides.
void RegisterCommunicationChannel(Endpoint* endpoint) override;

Powered by Google App Engine
This is Rietveld 408576698