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

Unified Diff: sync/notifier/non_blocking_invalidation_notifier.h

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use new API Created 8 years, 4 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 f76b37b9e2736cfa79c89cd2a1d949044ad949af..8431159ddb1bd0188441d391df96addf2e755dd0 100644
--- a/sync/notifier/non_blocking_invalidation_notifier.h
+++ b/sync/notifier/non_blocking_invalidation_notifier.h
@@ -18,8 +18,8 @@
#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"
+#include "sync/notifier/sync_notifier_registrar.h"
namespace base {
class SingleThreadTaskRunner;
@@ -27,6 +27,7 @@ class SingleThreadTaskRunner;
namespace syncer {
+// Generalize to NonBlockingSyncNotifier (http://crbug.com/140409).
msw 2012/08/09 05:20:26 nit: prepend TODO(akalin): or similar?
akalin 2012/08/10 01:28:08 Done.
class NonBlockingInvalidationNotifier
: public SyncNotifier,
// SyncNotifierObserver to "observe" our Core via WeakHandle.
@@ -44,8 +45,10 @@ class NonBlockingInvalidationNotifier
virtual ~NonBlockingInvalidationNotifier();
// SyncNotifier implementation.
+ virtual void RegisterHandler(SyncNotifierObserver* handler) OVERRIDE;
virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
const ObjectIdSet& ids) OVERRIDE;
+ virtual void UnregisterHandler(SyncNotifierObserver* handler) OVERRIDE;
virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
virtual void UpdateCredentials(
@@ -65,7 +68,7 @@ class NonBlockingInvalidationNotifier
base::WeakPtrFactory<NonBlockingInvalidationNotifier> weak_ptr_factory_;
- SyncNotifierHelper helper_;
+ SyncNotifierRegistrar registrar_;
// 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