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

Unified Diff: sync/tools/sync_listen_notifications.cc

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/tools/sync_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/tools/sync_listen_notifications.cc
diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc
index ef5ef1909fda182cbea0b429ec3898263539b9ac..3f3955c372fdd18c608252e29357aabe0d38f371 100644
--- a/sync/tools/sync_listen_notifications.cc
+++ b/sync/tools/sync_listen_notifications.cc
@@ -26,10 +26,10 @@
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base/model_type_state_map.h"
#include "sync/notifier/invalidation_state_tracker.h"
+#include "sync/notifier/invalidation_handler.h"
#include "sync/notifier/invalidation_util.h"
-#include "sync/notifier/sync_notifier.h"
-#include "sync/notifier/sync_notifier_factory.h"
-#include "sync/notifier/sync_notifier_observer.h"
+#include "sync/notifier/invalidator_factory.h"
+#include "sync/notifier/invalidator.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -49,7 +49,7 @@ const char kAllowInsecureConnectionSwitch[] = "allow-insecure-connection";
const char kNotificationMethodSwitch[] = "notification-method";
// Class to print received notifications events.
-class NotificationPrinter : public SyncNotifierObserver {
+class NotificationPrinter : public InvalidationHandler {
public:
NotificationPrinter() {}
virtual ~NotificationPrinter() {}
@@ -233,25 +233,25 @@ int SyncListenNotificationsMain(int argc, char* argv[]) {
new MyTestURLRequestContextGetter(io_thread.message_loop_proxy()));
const char kClientInfo[] = "sync_listen_notifications";
NullInvalidationStateTracker null_invalidation_state_tracker;
- SyncNotifierFactory sync_notifier_factory(
+ InvalidatorFactory invalidator_factory(
notifier_options, kClientInfo,
null_invalidation_state_tracker.AsWeakPtr());
- scoped_ptr<SyncNotifier> sync_notifier(
- sync_notifier_factory.CreateSyncNotifier());
+ scoped_ptr<Invalidator> invalidator(
+ invalidator_factory.CreateInvalidator());
NotificationPrinter notification_printer;
const char kUniqueId[] = "fake_unique_id";
- sync_notifier->SetUniqueId(kUniqueId);
- sync_notifier->UpdateCredentials(email, token);
+ invalidator->SetUniqueId(kUniqueId);
+ invalidator->UpdateCredentials(email, token);
// Listen for notifications for all known types.
- sync_notifier->RegisterHandler(&notification_printer);
- sync_notifier->UpdateRegisteredIds(
+ invalidator->RegisterHandler(&notification_printer);
+ invalidator->UpdateRegisteredIds(
&notification_printer, ModelTypeSetToObjectIdSet(ModelTypeSet::All()));
ui_loop.Run();
- sync_notifier->UnregisterHandler(&notification_printer);
+ invalidator->UnregisterHandler(&notification_printer);
io_thread.Stop();
return 0;
}
« no previous file with comments | « sync/tools/sync_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698