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

Unified Diff: components/copresence/public/copresence_client.h

Issue 441103002: Tests for the Copresence API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api
Patch Set: Fixing tests for the latest API. Created 6 years, 4 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
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();

Powered by Google App Engine
This is Rietveld 408576698