summaryrefslogtreecommitdiffstats
path: root/chrome/test/sync
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 22:58:22 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 22:58:22 +0000
commit2c3b7580b590f96d12e332bcfe3ade421fb483a5 (patch)
tree2e48e1b6b377f81f9bb429ccce4f10d53e592e16 /chrome/test/sync
parente39f838c3181ba37e4ced3ecf493b8770e8bc79d (diff)
downloadchromium_src-2c3b7580b590f96d12e332bcfe3ade421fb483a5.zip
chromium_src-2c3b7580b590f96d12e332bcfe3ade421fb483a5.tar.gz
chromium_src-2c3b7580b590f96d12e332bcfe3ade421fb483a5.tar.bz2
sync: Make SyncSession take most of its required state at construction time.
This is more prep for the MessageLoop based SyncerThread. Somewhat subtle: previously, if HasMoreToSync returned true, we'd grab a fresh copy of routing_info and workers for the next session, but now we hold the data constant, which I think is more sane. BUG=26339, 64136 TEST=sync_unit_tests, sync_integration_tests Review URL: http://codereview.chromium.org/5307001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/sync')
-rw-r--r--chrome/test/sync/engine/syncer_command_test.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/test/sync/engine/syncer_command_test.h b/chrome/test/sync/engine/syncer_command_test.h
index faeb4b5..808d71e 100644
--- a/chrome/test/sync/engine/syncer_command_test.h
+++ b/chrome/test/sync/engine/syncer_command_test.h
@@ -84,8 +84,12 @@ class SyncerCommandTestWithParam : public testing::TestWithParam<T>,
ModelSafeWorkerRegistrar* registrar() { return this; }
// Lazily create a session.
sessions::SyncSession* session() {
- if (!session_.get())
- session_.reset(new sessions::SyncSession(context(), delegate()));
+ if (!session_.get()) {
+ std::vector<ModelSafeWorker*> workers;
+ GetWorkers(&workers);
+ session_.reset(new sessions::SyncSession(context(), delegate(),
+ sessions::SyncSourceInfo(), routing_info_, workers));
+ }
return session_.get();
}
void ClearSession() {