Chromium Code Reviews| Index: components/copresence/public/copresence_client.h |
| diff --git a/components/copresence/public/copresence_client.h b/components/copresence/public/copresence_client.h |
| index 40b8bf97bfe4720e83416fae7eabd5e89574a568..6b7c6b3d1de08c545cc22959cf4a4b18032ae1d6 100644 |
| --- a/components/copresence/public/copresence_client.h |
| +++ b/components/copresence/public/copresence_client.h |
| @@ -41,18 +41,20 @@ struct PendingRequest { |
| // client. |
| class CopresenceClient : public base::SupportsWeakPtr<CopresenceClient> { |
| public: |
| - // The delegate must outlive us. |
| - explicit CopresenceClient(CopresenceClientDelegate* delegate); |
| + CopresenceClient(); |
| virtual ~CopresenceClient(); |
| + // The delegate must outlive us. |
| + virtual void Initialize(CopresenceClientDelegate* delegate); |
|
not at google - send to devlin
2014/08/06 21:45:27
I don't really like having separate Initialize fun
Charlie
2014/08/06 21:54:41
I'm not quite following what you're suggesting. Bu
not at google - send to devlin
2014/08/06 22:02:00
I don't think my suggestion is actually implementa
Charlie
2014/08/07 22:24:15
Switching to a Create() method per the CL-level th
|
| + |
| // This method will execute a report request. Each report request can have |
| // multiple (un)publishes, (un)subscribes. This will ensure that once the |
| // client is initialized, it sends all request to the server and handles |
| // the response. If an error is encountered, the status callback is used |
| // to relay it to the requester. |
| - void ExecuteReportRequest(copresence::ReportRequest request, |
| - const std::string& app_id, |
| - const StatusCallback& callback); |
| + virtual void ExecuteReportRequest(copresence::ReportRequest request, |
| + const std::string& app_id, |
| + const StatusCallback& callback); |
| // Called before the API (and thus the Client) is destructed. |
| void Shutdown(); |