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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 10832286: sync: Introduce control data types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index d82197f7e454f6aa1e836feae6f852c706cc734c..1ba9b1e01b279f2a7978edbe8f0d2a67d35bf9a1 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 (ModelTypeSet::Iterator it = enabled_datatypes_.First();
it.Good(); it.Inc()) {
- (*out)[it.Get()] = GROUP_PASSIVE;
+ if (!IsControlType(it.Get())) {
+ (*out)[it.Get()] = GROUP_PASSIVE;
+ } else {
+ (*out)[it.Get()] = GROUP_CONTROL;
+ }
}
}
@@ -223,7 +228,8 @@ class SyncerTest : public testing::Test,
EnableDatatype(NIGORI);
EnableDatatype(PREFERENCES);
EnableDatatype(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);
@@ -563,7 +569,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_;
ModelTypeSet enabled_datatypes_;
TrafficRecorder traffic_recorder_;

Powered by Google App Engine
This is Rietveld 408576698