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

Unified Diff: sync/notifier/sync_system_resources.h

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.h
diff --git a/sync/notifier/sync_system_resources.h b/sync/notifier/sync_system_resources.h
index 3ddc7087c94419c44d3873ef381b2672e57d55a9..22fcb96c2cf15f7d5108c21cea31875654f68f06 100644
--- a/sync/notifier/sync_system_resources.h
+++ b/sync/notifier/sync_system_resources.h
@@ -19,6 +19,7 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/non_thread_safe.h"
#include "google/cacheinvalidation/include/system-resources.h"
+#include "jingle/notifier/base/notifier_options.h"
#include "sync/base/sync_export.h"
#include "sync/notifier/invalidator_state.h"
#include "sync/notifier/state_writer.h"
@@ -110,12 +111,20 @@ class SYNC_EXPORT_PRIVATE SyncNetworkChannel
// Subclass should implement SendEncodedMessage to send encoded message to
// Tango over network.
virtual void SendEncodedMessage(const std::string& encoded_message) = 0;
+ virtual void UpdateCredentials(const std::string& email,
+ const std::string& token) = 0;
// Classes interested in network channel state changes should implement
// SyncNetworkChannel::Observer and register here.
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
+ // Helper functions that know how to construct network channels from channel
+ // specific parameters.
+ static scoped_ptr<SyncNetworkChannel> CreatePushClientChannel(
+ const notifier::NotifierOptions& notifier_options);
+ static scoped_ptr<SyncNetworkChannel> CreateGCMNetworkChannel();
+
const std::string& GetServiceContextForTest() const;
int64 GetSchedulingHashForTest() const;

Powered by Google App Engine
This is Rietveld 408576698