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

Unified Diff: chrome/browser/sync/engine/update_applicator.cc

Issue 6690020: sync: hook up ServerConnectionManager <> SyncerThread2 and tie up more loose ends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/debug
Patch Set: rebase Created 9 years, 9 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
Index: chrome/browser/sync/engine/update_applicator.cc
diff --git a/chrome/browser/sync/engine/update_applicator.cc b/chrome/browser/sync/engine/update_applicator.cc
index 6922c0f12e5540c1a117a7cf96313a784c8b3710..04eca4390567a7275ea9a2e1acd07be58bfbc152 100644
--- a/chrome/browser/sync/engine/update_applicator.cc
+++ b/chrome/browser/sync/engine/update_applicator.cc
@@ -91,10 +91,21 @@ void UpdateApplicator::Advance() {
}
bool UpdateApplicator::SkipUpdate(const syncable::Entry& entry) {
- ModelSafeGroup g =
- GetGroupForModelType(entry.GetServerModelType(), routing_info_);
+ syncable::ModelType type = entry.GetServerModelType();
+ ModelSafeGroup g = GetGroupForModelType(type, routing_info_);
+ // The extra routing_info count check here is to support GetUpdateses for
+ // a subset of the globally enabled types, and not attempt to update items
+ // if their type isn't permitted in the current run. These would typically
+ // be unapplied items from a previous sync.
Nicolas Zea 2011/03/25 18:53:03 It's not clear to me why the conditions are valid.
tim (not reviewing) 2011/03/28 20:02:25 Right, but types that were already enabled but not
if (g != group_filter_)
return true;
+ if (g == GROUP_PASSIVE &&
+ !routing_info_.count(type) &&
+ type != syncable::UNSPECIFIED &&
+ type != syncable::TOP_LEVEL_FOLDER) {
+ VLOG(1) << "Skipping update application, type not permitted.";
+ return true;
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698