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

Unified Diff: sync/notifier/non_blocking_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: Now with tests 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/non_blocking_invalidation_notifier.h
diff --git a/sync/notifier/non_blocking_invalidation_notifier.h b/sync/notifier/non_blocking_invalidation_notifier.h
index 0cea97985033816f28b8c3ca2317ed340d2d93a3..5034c4493d998770bcb0ffc420096afcabb5b10d 100644
--- a/sync/notifier/non_blocking_invalidation_notifier.h
+++ b/sync/notifier/non_blocking_invalidation_notifier.h
@@ -14,11 +14,11 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
#include "jingle/notifier/base/notifier_options.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/sync_notifier.h"
+#include "sync/notifier/sync_notifier_helper.h"
#include "sync/notifier/sync_notifier_observer.h"
namespace base {
@@ -44,14 +44,12 @@ class NonBlockingInvalidationNotifier
virtual ~NonBlockingInvalidationNotifier();
// 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;
@@ -60,7 +58,7 @@ class NonBlockingInvalidationNotifier
virtual void OnNotificationsDisabled(
NotificationsDisabledReason reason) OVERRIDE;
virtual void OnIncomingNotification(
- const syncer::ModelTypePayloadMap& type_payloads,
+ const ObjectIdPayloadMap& id_payloads,
IncomingNotificationSource source) OVERRIDE;
private:
@@ -68,8 +66,7 @@ class NonBlockingInvalidationNotifier
base::WeakPtrFactory<NonBlockingInvalidationNotifier> weak_ptr_factory_;
- // Our observers (which must live on the parent thread).
- ObserverList<SyncNotifierObserver> observers_;
+ SyncNotifierHelper helper_;
// The real guts of NonBlockingInvalidationNotifier, which allows
// this class to live completely on the parent thread.

Powered by Google App Engine
This is Rietveld 408576698