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

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

Issue 8637006: [Sync] Make syncer commands avoid posting tasks on threads with no work to do (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head, fix windows compile Created 9 years 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 | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/engine/verify_updates_command.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6246836e0189008962bcf9c1f0b3ab2b519e39af..e44083cf69e1a0e3d8b6cfa7584a3948ad6b920a 100644
--- a/chrome/browser/sync/engine/update_applicator.cc
+++ b/chrome/browser/sync/engine/update_applicator.cc
@@ -97,12 +97,12 @@ void UpdateApplicator::Advance() {
bool UpdateApplicator::SkipUpdate(const syncable::Entry& entry) {
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.
- if (g != group_filter_)
+ // The set of updates passed to the UpdateApplicator should already
+ // be group-filtered.
+ if (g != group_filter_) {
+ NOTREACHED();
return true;
+ }
if (g == GROUP_PASSIVE &&
!routing_info_.count(type) &&
type != syncable::UNSPECIFIED &&
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/engine/verify_updates_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698