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

Unified Diff: sync/notifier/invalidation_notifier.h

Issue 10823037: Revert r148496 "Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserver" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « sync/notifier/chrome_invalidation_client.h ('k') | sync/notifier/invalidation_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidation_notifier.h
diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h
index 8d74552b7b6f358b7eafd9ee30d955c6745d346d..c287efbd55d6a1c27f53a5850b733b2d63b7e24e 100644
--- a/sync/notifier/invalidation_notifier.h
+++ b/sync/notifier/invalidation_notifier.h
@@ -17,13 +17,13 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/chrome_invalidation_client.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/sync_notifier.h"
-#include "sync/notifier/sync_notifier_helper.h"
namespace notifier {
class PushClient;
@@ -49,12 +49,13 @@ class InvalidationNotifier
virtual ~InvalidationNotifier();
// SyncNotifier implementation.
- virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
- const ObjectIdSet& ids) OVERRIDE;
+ virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE;
virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
virtual void UpdateCredentials(
const std::string& email, const std::string& token) OVERRIDE;
+ virtual void UpdateEnabledTypes(ModelTypeSet enabled_types) OVERRIDE;
virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE;
// ChromeInvalidationClient::Listener implementation.
@@ -75,8 +76,6 @@ class InvalidationNotifier
};
State state_;
- SyncNotifierHelper helper_;
-
// Passed to |invalidation_client_|.
const InvalidationVersionMap initial_max_invalidation_versions_;
@@ -87,6 +86,9 @@ class InvalidationNotifier
// Passed to |invalidation_client_|.
const std::string client_info_;
+ // Our observers (which must live on the same thread).
+ ObserverList<SyncNotifierObserver> observers_;
+
// The client ID to pass to |chrome_invalidation_client_|.
std::string invalidation_client_id_;
« no previous file with comments | « sync/notifier/chrome_invalidation_client.h ('k') | sync/notifier/invalidation_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698