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

Unified Diff: components/invalidation/gcm_network_channel.h

Issue 348503002: Report InvalidatorState correctly from GCMNetworkChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@GCM.ConnectionState
Patch Set: Rebase 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.h
diff --git a/components/invalidation/gcm_network_channel.h b/components/invalidation/gcm_network_channel.h
index 69c7b70cf11267a4a2b25273ac4aece1407ee95b..52bca6ec52763c394951eb32aed727cb15e0fba1 100644
--- a/components/invalidation/gcm_network_channel.h
+++ b/components/invalidation/gcm_network_channel.h
@@ -93,9 +93,9 @@ class INVALIDATION_EXPORT_PRIVATE GCMNetworkChannel
const std::string& token);
void OnIncomingMessage(const std::string& message,
const std::string& echo_token);
- void OnConnectionStateChanged(
- GCMNetworkChannelDelegate::ConnectionState connection_state);
-
+ void OnConnectionStateChanged(bool online);
+ void UpdateGcmChannelState(bool online);
+ void UpdateHttpChannelState(bool online);
// Base64 encoding/decoding with URL safe alphabet.
// http://tools.ietf.org/html/rfc4648#page-7
static void Base64EncodeURLSafe(const std::string& input,
@@ -125,6 +125,11 @@ class INVALIDATION_EXPORT_PRIVATE GCMNetworkChannel
// GCM and shuld include it in headers with outgoing message over http.
std::string echo_token_;
+ // State of gcm and http channels. GCMNetworkChannel will only report
+ // INVALIDATIONS_ENABLED if both channels are online.
+ bool gcm_channel_online_;
+ bool http_channel_online_;
+
GCMNetworkChannelDiagnostic diagnostic_info_;
base::WeakPtrFactory<GCMNetworkChannel> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698