diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-22 11:56:41 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-22 11:56:41 +0000 |
commit | a54a51fdcee61c0b04f7b9cc7ccad296cf3b23a9 (patch) | |
tree | 9dfdb313cc2433a8406752103282add87a135f9e /sync/tools | |
parent | 8b77800e991ef7880b9afeff81018fe82d57e2ca (diff) | |
download | chromium_src-a54a51fdcee61c0b04f7b9cc7ccad296cf3b23a9.zip chromium_src-a54a51fdcee61c0b04f7b9cc7ccad296cf3b23a9.tar.gz chromium_src-a54a51fdcee61c0b04f7b9cc7ccad296cf3b23a9.tar.bz2 |
Revert r147801 "Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserver"
This broke sync_integration_tests like it had never been run.
Note that sync_integration_tests is not on GateKeeper but redness is still sad.
TBR=dcheng@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10806060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/tools')
-rw-r--r-- | sync/tools/sync_listen_notifications.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc index 22b22d6..25ebcbd 100644 --- a/sync/tools/sync_listen_notifications.cc +++ b/sync/tools/sync_listen_notifications.cc @@ -63,10 +63,8 @@ class NotificationPrinter : public SyncNotifierObserver { } virtual void OnIncomingNotification( - const ObjectIdPayloadMap& id_payloads, + const ModelTypePayloadMap& type_payloads, IncomingNotificationSource source) OVERRIDE { - const ModelTypePayloadMap& type_payloads = - ObjectIdPayloadMapToModelTypePayloadMap(id_payloads); for (ModelTypePayloadMap::const_iterator it = type_payloads.begin(); it != type_payloads.end(); ++it) { LOG(INFO) << (source == REMOTE_NOTIFICATION ? "Remote" : "Local") @@ -235,17 +233,17 @@ int SyncListenNotificationsMain(int argc, char* argv[]) { scoped_ptr<SyncNotifier> sync_notifier( sync_notifier_factory.CreateSyncNotifier()); NotificationPrinter notification_printer; + sync_notifier->AddObserver(¬ification_printer); const char kUniqueId[] = "fake_unique_id"; sync_notifier->SetUniqueId(kUniqueId); sync_notifier->UpdateCredentials(email, token); // Listen for notifications for all known types. - sync_notifier->UpdateRegisteredIds( - ¬ification_printer, ModelTypeSetToObjectIdSet(ModelTypeSet::All())); + sync_notifier->UpdateEnabledTypes(ModelTypeSet::All()); ui_loop.Run(); - sync_notifier->UpdateRegisteredIds(¬ification_printer, ObjectIdSet()); + sync_notifier->RemoveObserver(¬ification_printer); io_thread.Stop(); return 0; } |