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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 10559104: sync: Process 'control' data separately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename, cleanup, fix tests Created 8 years, 6 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 | « sync/engine/syncer.cc ('k') | sync/engine/syncer_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index aee0d1e36d840846593c0bf44a97e1d0f48e358f..d4eebbf8412a6d5a48d0b8ef9755df19c1bfa66a 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -147,7 +147,8 @@ class SyncerTest : public testing::Test,
}
void GetWorkers(std::vector<ModelSafeWorker*>* out) {
- out->push_back(worker_.get());
+ out->push_back(control_worker_.get());
+ out->push_back(passive_worker_.get());
}
void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) {
@@ -155,7 +156,11 @@ class SyncerTest : public testing::Test,
// the SyncerThread. Datatypes which aren't enabled aren't in the map.
for (syncable::ModelTypeSet::Iterator it = enabled_datatypes_.First();
it.Good(); it.Inc()) {
- (*out)[it.Get()] = GROUP_PASSIVE;
+ if (!IsInternalType(it.Get())) {
+ (*out)[it.Get()] = GROUP_PASSIVE;
+ } else {
+ (*out)[it.Get()] = GROUP_CONTROL;
+ }
}
}
@@ -222,7 +227,8 @@ class SyncerTest : public testing::Test,
EnableDatatype(syncable::NIGORI);
EnableDatatype(syncable::PREFERENCES);
EnableDatatype(syncable::NIGORI);
- worker_ = new FakeModelWorker(GROUP_PASSIVE);
+ passive_worker_ = new FakeModelWorker(GROUP_PASSIVE);
+ control_worker_ = new FakeModelWorker(GROUP_CONTROL);
std::vector<SyncEngineEventListener*> listeners;
listeners.push_back(this);
@@ -557,7 +563,8 @@ class SyncerTest : public testing::Test,
base::TimeDelta last_short_poll_interval_received_;
base::TimeDelta last_long_poll_interval_received_;
base::TimeDelta last_sessions_commit_delay_seconds_;
- scoped_refptr<ModelSafeWorker> worker_;
+ scoped_refptr<ModelSafeWorker> passive_worker_;
+ scoped_refptr<ModelSafeWorker> control_worker_;
syncable::ModelTypeSet enabled_datatypes_;
csync::TrafficRecorder traffic_recorder_;
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/engine/syncer_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698