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

Unified Diff: chrome/browser/sync/notifier/chrome_invalidation_client.cc

Issue 6358001: [Sync] Convert notifications for UNKNOWN to notifications for everything (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Tim's comments Created 9 years, 11 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 | « no previous file | chrome/browser/sync/notifier/server_notifier_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notifier/chrome_invalidation_client.cc
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.cc b/chrome/browser/sync/notifier/chrome_invalidation_client.cc
index 4a84d3d5210abd3622e4062f98f3083a7777d804..1fe2de005ffd734a165d6adcfc7fbce519a96c52 100644
--- a/chrome/browser/sync/notifier/chrome_invalidation_client.cc
+++ b/chrome/browser/sync/notifier/chrome_invalidation_client.cc
@@ -126,7 +126,14 @@ void ChromeInvalidationClient::Invalidate(
VLOG(1) << "Invalidate: " << InvalidationToString(invalidation);
syncable::ModelType model_type;
if (ObjectIdToRealModelType(invalidation.object_id(), &model_type)) {
- listener_->OnInvalidate(model_type);
+ // 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);
+ }
} else {
LOG(WARNING) << "Could not get invalidation model type; "
<< "invalidating everything";
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/server_notifier_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698