| 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..698425677b385e1320a9e425cd4bdf4436b0976c 100644
|
| --- a/components/copresence/public/copresence_client.h
|
| +++ b/components/copresence/public/copresence_client.h
|
| @@ -41,8 +41,6 @@ struct PendingRequest {
|
| // client.
|
| class CopresenceClient : public base::SupportsWeakPtr<CopresenceClient> {
|
| public:
|
| - // The delegate must outlive us.
|
| - explicit CopresenceClient(CopresenceClientDelegate* delegate);
|
| virtual ~CopresenceClient();
|
|
|
| // This method will execute a report request. Each report request can have
|
| @@ -50,14 +48,24 @@ class CopresenceClient : public base::SupportsWeakPtr<CopresenceClient> {
|
| // 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();
|
|
|
| + // Factory method for CopresenceClients. The delegate is owned
|
| + // by the caller, and must outlive the client.
|
| + static scoped_ptr<CopresenceClient> Create(
|
| + CopresenceClientDelegate* delegate);
|
| +
|
| + protected:
|
| + // Create clients with the Create() method.
|
| + CopresenceClient();
|
| +
|
| private:
|
| +
|
| void CompleteInitialization();
|
| void InitStepComplete(const std::string& step, bool success);
|
|
|
|
|