diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 11:26:26 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 11:26:26 +0000 |
commit | 5858dc71a9a0a6931b803006d8c56c8a7e99f228 (patch) | |
tree | be97e371012a4e15c94cb620e1049f98a67e00e7 /chrome | |
parent | a8607016e00b88f999787df99fd8ef77a574ac89 (diff) | |
download | chromium_src-5858dc71a9a0a6931b803006d8c56c8a7e99f228.zip chromium_src-5858dc71a9a0a6931b803006d8c56c8a7e99f228.tar.gz chromium_src-5858dc71a9a0a6931b803006d8c56c8a7e99f228.tar.bz2 |
[Sync] Remove code to listen to notifications for sync objects of unknown type
Server has been fixed to not need to send this out, so this code isn't
needed anymore.
Made vlogging work with sync_listen_notifications again.
BUG=71239
TEST=run:
./out/Debug/sync_listen_notifications --email=<some test email>@gmail.com --password=<test password> --vmodule=sync_listen_notification=1
and make sure you see all sync data types:
0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Apps -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Themes -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Encryption keys -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Sessions -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Autofill -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Bookmarks -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Passwords -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Extensions -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Typed URLs -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Preferences -
[0128/153326:INFO:sync_listen_notifications.cc(158)] OnInvalidate: Autofill Profiles -
Review URL: http://codereview.chromium.org/6282017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/notifier/chrome_invalidation_client.cc | 13 | ||||
-rw-r--r-- | chrome/browser/sync/syncable/model_type.cc | 18 | ||||
-rw-r--r-- | chrome/browser/sync/tools/sync_listen_notifications.cc | 1 |
3 files changed, 1 insertions, 31 deletions
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.cc b/chrome/browser/sync/notifier/chrome_invalidation_client.cc index 5d0cfd2a..f80a346 100644 --- a/chrome/browser/sync/notifier/chrome_invalidation_client.cc +++ b/chrome/browser/sync/notifier/chrome_invalidation_client.cc @@ -112,10 +112,6 @@ void ChromeInvalidationClient::RegisterTypes() { i < syncable::MODEL_TYPE_COUNT; ++i) { registration_manager_->RegisterType(syncable::ModelTypeFromInt(i)); } - // TODO(akalin): This is a hack to make new sync data types work - // with server-issued notifications. Remove this when it's not - // needed anymore. - registration_manager_->RegisterType(syncable::UNSPECIFIED); } void ChromeInvalidationClient::Invalidate( @@ -131,14 +127,7 @@ void ChromeInvalidationClient::Invalidate( if (invalidation.has_payload()) payload = invalidation.payload(); - // TODO(akalin): This is a hack to make new sync data types work - // with server-issued notifications. Remove this when it's not - // needed anymore. - if (model_type == syncable::UNSPECIFIED) { - listener_->OnInvalidateAll(); - } else { - listener_->OnInvalidate(model_type, payload); - } + listener_->OnInvalidate(model_type, payload); } else { LOG(WARNING) << "Could not get invalidation model type; " << "invalidating everything"; diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc index cc88f74..1aea654 100644 --- a/chrome/browser/sync/syncable/model_type.cc +++ b/chrome/browser/sync/syncable/model_type.cc @@ -327,13 +327,7 @@ const char kExtensionNotificationType[] = "EXTENSION"; const char kNigoriNotificationType[] = "NIGORI"; const char kAppNotificationType[] = "APP"; const char kSessionNotificationType[] = "SESSION"; -// TODO(lipalani) Bug 64111. -// talk to akalin to make sure this is what I understand this to be. const char kAutofillProfileNotificationType[] = "AUTOFILL_PROFILE"; -// TODO(akalin): This is a hack to make new sync data types work with -// server-issued notifications. Remove this when it's not needed -// anymore. -const char kUnknownNotificationType[] = "UNKNOWN"; } // namespace bool RealModelTypeToNotificationType(ModelType model_type, @@ -372,12 +366,6 @@ bool RealModelTypeToNotificationType(ModelType model_type, case AUTOFILL_PROFILE: *notification_type = kAutofillProfileNotificationType; return true; - // TODO(akalin): This is a hack to make new sync data types work with - // server-issued notifications. Remove this when it's not needed - // anymore. - case UNSPECIFIED: - *notification_type = kUnknownNotificationType; - return true; default: break; } @@ -420,12 +408,6 @@ bool NotificationTypeToRealModelType(const std::string& notification_type, } else if (notification_type == kAutofillProfileNotificationType) { *model_type = AUTOFILL_PROFILE; return true; - } else if (notification_type == kUnknownNotificationType) { - // TODO(akalin): This is a hack to make new sync data types work with - // server-issued notifications. Remove this when it's not needed - // anymore. - *model_type = UNSPECIFIED; - return true; } *model_type = UNSPECIFIED; return false; diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc index a483eb0..35dfeff 100644 --- a/chrome/browser/sync/tools/sync_listen_notifications.cc +++ b/chrome/browser/sync/tools/sync_listen_notifications.cc @@ -224,7 +224,6 @@ int main(int argc, char* argv[]) { logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE, logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); - logging::SetMinLogLevel(logging::LOG_INFO); // TODO(akalin): Make sure that all log messages are printed to the // console, even on Windows (SetMinLogLevel isn't enough). talk_base::LogMessage::LogToDebug(talk_base::LS_VERBOSE); |