Index: ipc/attachment_broker_unprivileged.h |
diff --git a/ipc/attachment_broker_unprivileged.h b/ipc/attachment_broker_unprivileged.h |
index b572ff8266a2fbef12bb5a2aa8dcd30ee3bef397..f22afb8bf20760ae75344d6524c99ddcc1cdbd70 100644 |
--- a/ipc/attachment_broker_unprivileged.h |
+++ b/ipc/attachment_broker_unprivileged.h |
@@ -22,17 +22,14 @@ 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(); |
- |
- // In each unprivileged process, exactly one channel should be used to |
- // communicate brokerable attachments with the broker process. |
- void DesignateBrokerCommunicationChannel(Endpoint* endpoint); |
+ // 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(); |
+ |
+ // AttachmentBroker overrides. |
Tom Sepez
2016/02/09 00:26:19
nit: the convention is just to write
// Attachme
erikchen
2016/02/09 02:38:51
Done.
|
+ void DesignateBrokerCommunicationChannel(Endpoint* endpoint) override; |
+ bool IsPrivilegedBroker() override; |
protected: |
IPC::Sender* get_sender() { return sender_; } |