Clean up public interface of AttachmentBrokerUnprivileged.

In the old interface, a static factory method returns a scoped_ptr, and the
caller had to manage the lifetime. Since this is a global object with minimal
memory footprint, and is required to outlive every IPC::Channel, it's much
easier for the global to never be destroyed. This also matches the interface for
AttachmentBrokerPrivileged.

BUG=584297

Committed: https://crrev.com/11fea2242b3a197993dbd5a1f977f9a31c6b98e4
Cr-Commit-Position: refs/heads/master@{#375674}

Review URL: https://codereview.chromium.org/1679763002

Cr-Commit-Position: refs/heads/master@{#375776}


CrOS-Libchrome-Original-Commit: 8666287a9b42256b20692765f43c12a960398699
diff --git a/ipc/attachment_broker.h b/ipc/attachment_broker.h
index 4cf1ab5..d936f44 100644
--- a/ipc/attachment_broker.h
+++ b/ipc/attachment_broker.h
@@ -97,6 +97,14 @@
   virtual void RegisterCommunicationChannel(Endpoint* endpoint);
   virtual void DeregisterCommunicationChannel(Endpoint* endpoint);
 
+  // In each unprivileged process, exactly one channel should be used to
+  // communicate brokerable attachments with the broker process.
+  virtual void RegisterBrokerCommunicationChannel(Endpoint* endpoint);
+  virtual void DeregisterBrokerCommunicationChannel(Endpoint* endpoint);
+
+  // True if and only if this broker is privileged.
+  virtual bool IsPrivilegedBroker();
+
  protected:
   using AttachmentVector = std::vector<scoped_refptr<BrokerableAttachment>>;