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

Unified Diff: sync/notifier/non_blocking_invalidation_notifier.cc

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client target 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.cc
diff --git a/sync/notifier/non_blocking_invalidation_notifier.cc b/sync/notifier/non_blocking_invalidation_notifier.cc
index 89fb19a3432fe6490363f4d7b3f415e1a6bcc765..0f04b613ea851a61428f6561f8b978a145c1116c 100644
--- a/sync/notifier/non_blocking_invalidation_notifier.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier.cc
@@ -19,13 +19,13 @@ namespace syncer {
class NonBlockingInvalidationNotifier::Core
: public base::RefCountedThreadSafe<NonBlockingInvalidationNotifier::Core>,
- // SyncNotifierObserver to observe the InvalidationNotifier we create.
- public SyncNotifierObserver {
+ // InvalidationHandler to observe the InvalidationNotifier we create.
+ public InvalidationHandler {
public:
// Called on parent thread. |delegate_observer| should be
// initialized.
explicit Core(
- const WeakHandle<SyncNotifierObserver>& delegate_observer);
+ const WeakHandle<InvalidationHandler>& delegate_observer);
// Helpers called on I/O thread.
void Initialize(
@@ -40,7 +40,7 @@ class NonBlockingInvalidationNotifier::Core
void SetStateDeprecated(const std::string& state);
void UpdateCredentials(const std::string& email, const std::string& token);
- // SyncNotifierObserver implementation (all called on I/O thread by
+ // InvalidationHandler implementation (all called on I/O thread by
// InvalidationNotifier).
virtual void OnNotificationsEnabled() OVERRIDE;
virtual void OnNotificationsDisabled(
@@ -56,7 +56,7 @@ class NonBlockingInvalidationNotifier::Core
~Core();
// The variables below should be used only on the I/O thread.
- const WeakHandle<SyncNotifierObserver> delegate_observer_;
+ const WeakHandle<InvalidationHandler> delegate_observer_;
scoped_ptr<InvalidationNotifier> invalidation_notifier_;
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
@@ -64,7 +64,7 @@ class NonBlockingInvalidationNotifier::Core
};
NonBlockingInvalidationNotifier::Core::Core(
- const WeakHandle<SyncNotifierObserver>& delegate_observer)
+ const WeakHandle<InvalidationHandler>& delegate_observer)
: delegate_observer_(delegate_observer) {
DCHECK(delegate_observer_.IsInitialized());
}
@@ -128,21 +128,21 @@ void NonBlockingInvalidationNotifier::Core::UpdateCredentials(
void NonBlockingInvalidationNotifier::Core::OnNotificationsEnabled() {
DCHECK(network_task_runner_->BelongsToCurrentThread());
delegate_observer_.Call(FROM_HERE,
- &SyncNotifierObserver::OnNotificationsEnabled);
+ &InvalidationHandler::OnNotificationsEnabled);
}
void NonBlockingInvalidationNotifier::Core::OnNotificationsDisabled(
NotificationsDisabledReason reason) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
delegate_observer_.Call(
- FROM_HERE, &SyncNotifierObserver::OnNotificationsDisabled, reason);
+ FROM_HERE, &InvalidationHandler::OnNotificationsDisabled, reason);
}
void NonBlockingInvalidationNotifier::Core::OnIncomingNotification(
const ObjectIdStateMap& id_state_map, IncomingNotificationSource source) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
delegate_observer_.Call(FROM_HERE,
- &SyncNotifierObserver::OnIncomingNotification,
+ &InvalidationHandler::OnIncomingNotification,
id_state_map,
source);
}
@@ -186,13 +186,13 @@ NonBlockingInvalidationNotifier::~NonBlockingInvalidationNotifier() {
}
void NonBlockingInvalidationNotifier::RegisterHandler(
- SyncNotifierObserver* handler) {
+ InvalidationHandler* handler) {
DCHECK(parent_task_runner_->BelongsToCurrentThread());
registrar_.RegisterHandler(handler);
}
void NonBlockingInvalidationNotifier::UpdateRegisteredIds(
- SyncNotifierObserver* handler,
+ InvalidationHandler* handler,
const ObjectIdSet& ids) {
DCHECK(parent_task_runner_->BelongsToCurrentThread());
registrar_.UpdateRegisteredIds(handler, ids);
@@ -207,7 +207,7 @@ void NonBlockingInvalidationNotifier::UpdateRegisteredIds(
}
void NonBlockingInvalidationNotifier::UnregisterHandler(
- SyncNotifierObserver* handler) {
+ InvalidationHandler* handler) {
DCHECK(parent_task_runner_->BelongsToCurrentThread());
registrar_.UnregisterHandler(handler);
}

Powered by Google App Engine
This is Rietveld 408576698