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

Unified Diff: sync/notifier/invalidation_notifier.h

Issue 10702074: Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS 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
Index: sync/notifier/invalidation_notifier.h
diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h
index e76732f1c2df57664f30aa204e9c9b68a275f617..778b93affd62d79602129e12d61c3e83e33bb769 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,14 +49,12 @@ class InvalidationNotifier
virtual ~InvalidationNotifier();
// SyncNotifier implementation.
- virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE;
- virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE;
+ virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
+ const ObjectIdSet& ids) 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(
- syncer::ModelTypeSet enabled_types) OVERRIDE;
virtual void SendNotification(
syncer::ModelTypeSet changed_types) OVERRIDE;
@@ -78,6 +76,9 @@ class InvalidationNotifier
};
State state_;
+ SyncNotifierHelper helper_;
+ ObjectIdSet registered_ids_;
akalin 2012/07/19 00:42:06 registered_ids_ isn't needed is it?
dcheng 2012/07/19 18:31:05 Done.
+
// Passed to |invalidation_client_|.
const InvalidationVersionMap initial_max_invalidation_versions_;
@@ -88,9 +89,6 @@ 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_;

Powered by Google App Engine
This is Rietveld 408576698