Index: ipc/attachment_broker_unprivileged.h |
diff --git a/ipc/attachment_broker_unprivileged.h b/ipc/attachment_broker_unprivileged.h |
index b572ff8266a2fbef12bb5a2aa8dcd30ee3bef397..f6d520de6e3bb1a0ad4faa455ce450bf8c93c192 100644 |
--- a/ipc/attachment_broker_unprivileged.h |
+++ b/ipc/attachment_broker_unprivileged.h |
@@ -22,17 +22,15 @@ class IPC_EXPORT AttachmentBrokerUnprivileged : public IPC::AttachmentBroker { |
AttachmentBrokerUnprivileged(); |
~AttachmentBrokerUnprivileged() 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<AttachmentBrokerUnprivileged> CreateBroker(); |
+ // If there is no global attachment broker, makes a new |
+ // AttachmentBrokerUnprivileged and sets it as the global attachment broker. |
+ // This method is thread safe. |
+ static void CreateBrokerIfNeeded(); |
- // In each unprivileged process, exactly one channel should be used to |
- // communicate brokerable attachments with the broker process. |
- void DesignateBrokerCommunicationChannel(Endpoint* endpoint); |
+ // AttachmentBroker: |
+ void RegisterBrokerCommunicationChannel(Endpoint* endpoint) override; |
+ void DeregisterBrokerCommunicationChannel(Endpoint* endpoint) override; |
+ bool IsPrivilegedBroker() override; |
protected: |
IPC::Sender* get_sender() { return sender_; } |