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

Unified Diff: components/invalidation/gcm_network_channel_delegate.h

Issue 334253006: Notify SyncNetworkChannel about GCM connection state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 6 years, 6 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/invalidation/gcm_network_channel_delegate.h
diff --git a/components/invalidation/gcm_network_channel_delegate.h b/components/invalidation/gcm_network_channel_delegate.h
index fe997fe150fe89e41aea784e810998bddcbc4bc5..3f89304382783ebd1055a78fccdd0d7eb4bd0523 100644
--- a/components/invalidation/gcm_network_channel_delegate.h
+++ b/components/invalidation/gcm_network_channel_delegate.h
@@ -24,16 +24,23 @@ namespace syncer {
// thread and callbacks should be invoked there as well.
class GCMNetworkChannelDelegate {
public:
+ enum ConnectionState {
+ CONNECTION_STATE_OFFLINE,
+ CONNECTION_STATE_ONLINE
+ };
+
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;
typedef base::Callback<void(const std::string& message,
const std::string& echo_token)> MessageCallback;
+ typedef base::Callback<void(ConnectionState connection_state)>
+ ConnectionStateCallback;
virtual ~GCMNetworkChannelDelegate() {}
- virtual void Initialize() = 0;
+ virtual void Initialize(ConnectionStateCallback callback) = 0;
// Request access token. Callback should be called either with access token or
// error code.
virtual void RequestToken(RequestTokenCallback callback) = 0;
« no previous file with comments | « components/invalidation/gcm_network_channel.cc ('k') | components/invalidation/gcm_network_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698