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

Unified Diff: sync/notifier/gcm_network_channel_delegate.h

Issue 140513002: Client-to-server messages in GCMNetworkChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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: sync/notifier/gcm_network_channel_delegate.h
diff --git a/sync/notifier/gcm_network_channel_delegate.h b/sync/notifier/gcm_network_channel_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6b56a87688d127357eb48b2f30ba0daeaecf5cc
--- /dev/null
+++ b/sync/notifier/gcm_network_channel_delegate.h
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_
+#define SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "google_apis/gcm/gcm_client.h"
+
+class GoogleServiceAuthError;
+
+namespace syncer {
+
+class GCMNetworkChannelDelegate {
+ public:
+ typedef base::Callback<void(const GoogleServiceAuthError& error,
+ const std::string& token)> RequestTokenCallback;
+ typedef base::Callback<void(const std::string& registration_id,
+ gcm::GCMClient::Result result)> RegisterCallback;
+
+ virtual ~GCMNetworkChannelDelegate() {}
+
+ virtual void RequestToken(RequestTokenCallback callback) = 0;
rlarocque 2014/01/16 18:52:48 Please add a few function comments. A class and/o
pavely 2014/01/17 00:44:39 Done.
+ virtual void InvalidateToken(const std::string& token) = 0;
+
+ virtual void Register(RegisterCallback callback) = 0;
+};
+} // namespace syncer
+
+#endif // SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698