Index: sync/notifier/sync_system_resources.cc |
diff --git a/sync/notifier/sync_system_resources.cc b/sync/notifier/sync_system_resources.cc |
index 99e3ee5ea5dea8be9118ddc947572ce44ed0ce27..c9ca21230fb8a04eda579bdc427452eb88180e32 100644 |
--- a/sync/notifier/sync_system_resources.cc |
+++ b/sync/notifier/sync_system_resources.cc |
@@ -17,7 +17,10 @@ |
#include "google/cacheinvalidation/client_gateway.pb.h" |
#include "google/cacheinvalidation/deps/callback.h" |
#include "google/cacheinvalidation/include/types.h" |
+#include "jingle/notifier/listener/push_client.h" |
+#include "sync/notifier/gcm_network_channel.h" |
#include "sync/notifier/invalidation_util.h" |
+#include "sync/notifier/push_client_channel.h" |
namespace syncer { |
@@ -168,6 +171,18 @@ void SyncNetworkChannel::RemoveObserver(Observer* observer) { |
observers_.RemoveObserver(observer); |
} |
+scoped_ptr<SyncNetworkChannel> SyncNetworkChannel::CreatePushClientChannel( |
+ const notifier::NotifierOptions& notifier_options) { |
+ scoped_ptr<notifier::PushClient> push_client( |
+ notifier::PushClient::CreateDefaultOnIOThread(notifier_options)); |
+ return scoped_ptr<SyncNetworkChannel>( |
+ new PushClientChannel(push_client.Pass())); |
+} |
+ |
+scoped_ptr<SyncNetworkChannel> SyncNetworkChannel::CreateGCMNetworkChannel() { |
+ return scoped_ptr<SyncNetworkChannel>(new GCMNetworkChannel()); |
+} |
+ |
const std::string& SyncNetworkChannel::GetServiceContextForTest() const { |
return service_context_; |
} |