Chromium Code Reviews| Index: ipc/ipc_channel.h |
| diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h |
| index c1ad4172bd169f590d025314c027e8e7ef853c4e..6653939f153193a95994680a6c4971e8e727bfb9 100644 |
| --- a/ipc/ipc_channel.h |
| +++ b/ipc/ipc_channel.h |
| @@ -165,6 +165,8 @@ class IPC_EXPORT Channel : public Endpoint { |
| // connect to a pre-existing pipe. Note, calling Connect() |
| // will not block the calling thread and may complete |
| // asynchronously. |
| + // |
| + // The subclass implementation must call OnConnect(). |
|
Tom Sepez
2016/04/22 00:33:22
nit: when? "when the connection is completed"? or
erikchen
2016/04/22 01:42:18
I renamed the method to WillConnect() and updated
|
| virtual bool Connect() WARN_UNUSED_RESULT = 0; |
| // Close this Channel explicitly. May be called multiple times. |
| @@ -255,6 +257,15 @@ class IPC_EXPORT Channel : public Endpoint { |
| void* buffer_; |
| size_t length_; |
| }; |
| + |
| + // Endpoint overrides. |
| + void OnSetAttachmentBrokerEndpoint() override; |
| + |
| + // Subclasses should call this method after connecting. |
|
Tom Sepez
2016/04/22 00:33:22
should vs. must?
erikchen
2016/04/22 01:42:18
Updated the comment to use MUST.
|
| + void OnConnect(); |
| + |
| + private: |
| + bool did_connect_ = false; |
| }; |
| #if defined(OS_POSIX) |