diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 18:36:21 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 18:36:21 +0000 |
commit | 932a7c831a73253afe68d8368e74f71ae0101e4e (patch) | |
tree | 88339c4bf1a4d7acbf287b52a0ecd0ff4388232e /chrome/browser/sync/engine/syncer_unittest.cc | |
parent | 64688e49023269bc2cde0d7890dccf665c1195c2 (diff) | |
download | chromium_src-932a7c831a73253afe68d8368e74f71ae0101e4e.zip chromium_src-932a7c831a73253afe68d8368e74f71ae0101e4e.tar.gz chromium_src-932a7c831a73253afe68d8368e74f71ae0101e4e.tar.bz2 |
[Sync] Make syncer commands avoid posting tasks on threads with no work to do
Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand.
Use that to figure out which worker threads to post work on (instead of
posting on all of them).
Implement GetGroupsToChange() for each ModelChangingSyncerCommand.
Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession.
Key unapplied updates index by type for ApplyUpdatesCommand.
Make the abstract methods of ModelChangingSyncerCommand protected.
This patch includes a speculative fix for the perf regression introduced by the last time this was landed (112178).
BUG=97832
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178
Review URL: http://codereview.chromium.org/8637006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer_unittest.cc')
-rw-r--r-- | chrome/browser/sync/engine/syncer_unittest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc index 582655e..50c30fc 100644 --- a/chrome/browser/sync/engine/syncer_unittest.cc +++ b/chrome/browser/sync/engine/syncer_unittest.cc @@ -2162,6 +2162,8 @@ TEST_F(SyncerTest, CommitsUpdateDoesntAlterEntry) { } TEST_F(SyncerTest, ParentAndChildBothMatch) { + syncable::ModelTypeBitSet all_types; + all_types.set(); ScopedDirLookup dir(syncdb_.manager(), syncdb_.name()); CHECK(dir.good()); syncable::Id parent_id = ids_.NewServerId(); @@ -2198,7 +2200,7 @@ TEST_F(SyncerTest, ParentAndChildBothMatch) { dir->GetChildHandlesById(&trans, parent_id, &children); EXPECT_EQ(1u, children.size()); Directory::UnappliedUpdateMetaHandles unapplied; - dir->GetUnappliedUpdateMetaHandles(&trans, &unapplied); + dir->GetUnappliedUpdateMetaHandles(&trans, all_types, &unapplied); EXPECT_EQ(0u, unapplied.size()); syncable::Directory::UnsyncedMetaHandles unsynced; dir->GetUnsyncedMetaHandles(&trans, &unsynced); |