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_; |