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

Unified Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 10837231: sync: add InternalComponentsFactory::Switches to simplify passing switches to internal components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pass switches in test_profile_sync_service.cc 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: chrome/browser/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index f6528e7c75ffaa75bdff9812fcbdcfcdcbaa1447..a51ecb6be338fea7bc320b13c07140063b5ce64a 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -17,6 +17,7 @@
#include "sync/protocol/encryption.pb.h"
#include "sync/syncable/directory.h"
+using syncer::InternalComponentsFactory;
using syncer::ModelSafeRoutingInfo;
using syncer::TestInternalComponentsFactory;
using syncer::sessions::ModelNeutralState;
@@ -69,10 +70,14 @@ void SyncBackendHostForProfileSyncTest::InitCore(
// It'd be nice if we avoided creating the InternalComponentsFactory in the
// first place, but SyncBackendHost will have created one by now so we must
- // free it.
+ // free it. Grab the switches to pass on first.
+ InternalComponentsFactory::Switches factory_switches =
+ test_options.internal_components_factory->GetSwitches();
delete test_options.internal_components_factory;
+
test_options.internal_components_factory =
- new TestInternalComponentsFactory(storage);
+ new TestInternalComponentsFactory(factory_switches, storage);
+
SyncBackendHost::InitCore(test_options);
if (synchronous_init_) {
// The SyncBackend posts a task to the current loop when

Powered by Google App Engine
This is Rietveld 408576698