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

Unified Diff: sync/notifier/invalidator.h

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT for landing 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
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidator.h
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/invalidator.h
similarity index 71%
rename from sync/notifier/sync_notifier.h
rename to sync/notifier/invalidator.h
index 9191b90f8ffff43114a2c4386905d62ac5945be8..2765a67cc79424ec085e65c07ef090ad3703fc56 100644
--- a/sync/notifier/sync_notifier.h
+++ b/sync/notifier/invalidator.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Interface to the sync notifier, which is an object that receives
-// notifications when updates are available for a set of sync types.
-// All the observers are notified when such an event happens.
+// Interface to the invalidator, which is an object that receives
+// invalidations for registered object IDs. The corresponding
+// InvalidationHandler is notifier when such an event occurs.
-#ifndef SYNC_NOTIFIER_SYNC_NOTIFIER_H_
-#define SYNC_NOTIFIER_SYNC_NOTIFIER_H_
+#ifndef SYNC_NOTIFIER_INVALIDATOR_H_
+#define SYNC_NOTIFIER_INVALIDATOR_H_
#include <string>
@@ -15,28 +15,28 @@
#include "sync/notifier/invalidation_util.h"
namespace syncer {
-class SyncNotifierObserver;
+class InvalidationHandler;
-class SyncNotifier {
+class Invalidator {
public:
- SyncNotifier() {}
- virtual ~SyncNotifier() {}
+ Invalidator() {}
+ virtual ~Invalidator() {}
// Clients should follow the pattern below:
//
// When starting the client:
//
- // notifier->RegisterHandler(client_handler);
+ // invalidator->RegisterHandler(client_handler);
//
// When the set of IDs to register changes for the client during its lifetime
// (i.e., between calls to RegisterHandler(client_handler) and
// UnregisterHandler(client_handler):
//
- // notifier->UpdateRegisteredIds(client_handler, client_ids);
+ // invalidator->UpdateRegisteredIds(client_handler, client_ids);
//
- // When shutting down the client for browser shutdown:
+ // When shutting down the client for profile shutdown:
//
- // notifier->UnregisterHandler(client_handler);
+ // invalidator->UnregisterHandler(client_handler);
//
// Note that there's no call to UpdateRegisteredIds() -- this is because the
// invalidation API persists registrations across browser restarts.
@@ -44,23 +44,23 @@ class SyncNotifier {
// When permanently shutting down the client, e.g. when disabling the related
// feature:
//
- // notifier->UpdateRegisteredIds(client_handler, ObjectIdSet());
- // notifier->UnregisterHandler(client_handler);
+ // invalidator->UpdateRegisteredIds(client_handler, ObjectIdSet());
+ // invalidator->UnregisterHandler(client_handler);
// Starts sending notifications to |handler|. |handler| must not be NULL,
// and it must already be registered.
- virtual void RegisterHandler(SyncNotifierObserver* handler) = 0;
+ virtual void RegisterHandler(InvalidationHandler* handler) = 0;
// Updates the set of ObjectIds associated with |handler|. |handler| must
// not be NULL, and must already be registered. An ID must be registered for
// at most one handler.
- virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
+ virtual void UpdateRegisteredIds(InvalidationHandler* handler,
const ObjectIdSet& ids) = 0;
// Stops sending notifications to |handler|. |handler| must not be NULL, and
// it must already be registered. Note that this doesn't unregister the IDs
// associated with |handler|.
- virtual void UnregisterHandler(SyncNotifierObserver* handler) = 0;
+ virtual void UnregisterHandler(InvalidationHandler* handler) = 0;
// SetUniqueId must be called once, before any call to
// UpdateCredentials. |unique_id| should be a non-empty globally
@@ -86,4 +86,4 @@ class SyncNotifier {
};
} // namespace syncer
-#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_H_
+#endif // SYNC_NOTIFIER_INVALIDATOR_H_
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698