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

Unified Diff: ipc/attachment_broker_unprivileged.h

Issue 1679763002: Clean up public interface of AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CHECK. Created 4 years, 10 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_privileged_win_unittest.cc ('k') | ipc/attachment_broker_unprivileged.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « ipc/attachment_broker_privileged_win_unittest.cc ('k') | ipc/attachment_broker_unprivileged.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698