Index: sync/notifier/sync_system_resources.cc |
diff --git a/sync/notifier/sync_system_resources.cc b/sync/notifier/sync_system_resources.cc |
index c9ca21230fb8a04eda579bdc427452eb88180e32..68eb6bc7fe1ce0d1650d87646819211d3dbe7ebc 100644 |
--- a/sync/notifier/sync_system_resources.cc |
+++ b/sync/notifier/sync_system_resources.cc |
@@ -19,6 +19,7 @@ |
#include "google/cacheinvalidation/include/types.h" |
#include "jingle/notifier/listener/push_client.h" |
#include "sync/notifier/gcm_network_channel.h" |
+#include "sync/notifier/gcm_network_channel_delegate.h" |
#include "sync/notifier/invalidation_util.h" |
#include "sync/notifier/push_client_channel.h" |
@@ -179,8 +180,11 @@ scoped_ptr<SyncNetworkChannel> SyncNetworkChannel::CreatePushClientChannel( |
new PushClientChannel(push_client.Pass())); |
} |
-scoped_ptr<SyncNetworkChannel> SyncNetworkChannel::CreateGCMNetworkChannel() { |
- return scoped_ptr<SyncNetworkChannel>(new GCMNetworkChannel()); |
+scoped_ptr<SyncNetworkChannel> SyncNetworkChannel::CreateGCMNetworkChannel( |
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
+ scoped_ptr<GCMNetworkChannelDelegate> delegate) { |
+ return scoped_ptr<SyncNetworkChannel>(new GCMNetworkChannel( |
+ request_context_getter, delegate.Pass())); |
} |
const std::string& SyncNetworkChannel::GetServiceContextForTest() const { |
@@ -207,8 +211,9 @@ bool SyncNetworkChannel::DecodeMessageForTest( |
return DecodeMessage(data, message, service_context, scheduling_hash); |
} |
-void SyncNetworkChannel::NotifyStateChange(InvalidatorState invalidator_state) { |
- // Remember state for future NetworkStatusReceivers. |
+void SyncNetworkChannel::SetNetworkState(InvalidatorState invalidator_state) { |
+ if (invalidator_state_ == invalidator_state) |
+ return; |
invalidator_state_ = invalidator_state; |
// Notify NetworkStatusReceivers in cacheinvalidation. |
for (NetworkStatusReceiverList::const_iterator it = |