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

Unified Diff: sync/notifier/chrome_invalidation_client.h

Issue 10436013: [Sync] Make InvalidationNotifier use PushClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 7 months 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/chrome_invalidation_client.h
diff --git a/sync/notifier/chrome_invalidation_client.h b/sync/notifier/chrome_invalidation_client.h
index 45f50370ab5164d4039ed4d5432eaed619a7d46b..0d6ac8a28da77bcb5b61cfc3fb197c83bad16fad 100644
--- a/sync/notifier/chrome_invalidation_client.h
+++ b/sync/notifier/chrome_invalidation_client.h
@@ -28,11 +28,14 @@ namespace buzz {
class XmppTaskParentInterface;
} // namespace buzz
+namespace notifier {
+class PushClient;
+} // namespace notifier
+
namespace sync_notifier {
using invalidation::InvalidationListener;
-class CacheInvalidationPacketHandler;
class RegistrationManager;
// ChromeInvalidationClient is not thread-safe and lives on the sync
@@ -51,14 +54,14 @@ class ChromeInvalidationClient
virtual void OnSessionStatusChanged(bool has_session) = 0;
};
- ChromeInvalidationClient();
+ explicit ChromeInvalidationClient(
+ scoped_ptr<notifier::PushClient> push_client);
// Calls Stop().
virtual ~ChromeInvalidationClient();
// Does not take ownership of |listener| or |state_writer|.
// |invalidation_state_tracker| must be initialized.
- // |base_task| must still be non-NULL.
void Start(
const std::string& client_id, const std::string& client_info,
const std::string& state,
@@ -66,15 +69,9 @@ class ChromeInvalidationClient
const browser_sync::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
Listener* listener,
- StateWriter* state_writer,
- base::WeakPtr<buzz::XmppTaskParentInterface> base_task);
-
- void Stop();
+ StateWriter* state_writer);
- // Changes the task used to |base_task|, which must still be
- // non-NULL. Must only be called between calls to Start() and
- // Stop().
- void ChangeBaseTask(base::WeakPtr<buzz::XmppTaskParentInterface> base_task);
+ void UpdateCredentials(const std::string& email, const std::string& token);
// Register the sync types that we're interested in getting
// notifications for. May be called at any time.
@@ -116,6 +113,8 @@ class ChromeInvalidationClient
private:
friend class ChromeInvalidationClientTest;
+ void Stop();
+
void EmitInvalidation(
syncable::ModelTypeSet types, const std::string& payload);
@@ -127,8 +126,6 @@ class ChromeInvalidationClient
Listener* listener_;
StateWriter* state_writer_;
scoped_ptr<invalidation::InvalidationClient> invalidation_client_;
- scoped_ptr<CacheInvalidationPacketHandler>
- cache_invalidation_packet_handler_;
scoped_ptr<RegistrationManager> registration_manager_;
// Stored to pass to |registration_manager_| on start.
syncable::ModelTypeSet registered_types_;
« no previous file with comments | « sync/notifier/cache_invalidation_packet_handler_unittest.cc ('k') | sync/notifier/chrome_invalidation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698