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

Unified Diff: sync/notifier/sync_system_resources.cc

Issue 116533006: Control invalidations network channel from TiclInvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years 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: 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_;
}

Powered by Google App Engine
This is Rietveld 408576698