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

Unified Diff: sync/internal_api/test/test_internal_components_factory.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: sync/internal_api/test/test_internal_components_factory.cc
diff --git a/sync/internal_api/test/test_internal_components_factory.cc b/sync/internal_api/test/test_internal_components_factory.cc
index 75c559a806fc2f5561d68fe59cf6701f85d9cff2..a195609bb59dbc135090869c6332064e58cf44e3 100644
--- a/sync/internal_api/test/test_internal_components_factory.cc
+++ b/sync/internal_api/test/test_internal_components_factory.cc
@@ -13,8 +13,10 @@
namespace syncer {
TestInternalComponentsFactory::TestInternalComponentsFactory(
+ const Switches& switches,
StorageOption option)
- : storage_option_(option) {
+ : switches_(switches),
+ storage_option_(option) {
}
TestInternalComponentsFactory::~TestInternalComponentsFactory() { }
@@ -33,8 +35,7 @@ TestInternalComponentsFactory::BuildContext(
ThrottledDataTypeTracker* throttled_data_type_tracker,
const std::vector<SyncEngineEventListener*>& listeners,
sessions::DebugInfoGetter* debug_info_getter,
- TrafficRecorder* traffic_recorder,
- bool keystore_encryption_enabled) {
+ TrafficRecorder* traffic_recorder) {
// Tests don't wire up listeners.
std::vector<SyncEngineEventListener*> empty_listeners;
@@ -43,7 +44,7 @@ TestInternalComponentsFactory::BuildContext(
connection_manager, directory, workers, monitor,
throttled_data_type_tracker, empty_listeners, debug_info_getter,
traffic_recorder,
- keystore_encryption_enabled));
+ switches_.encryption_method == ENCRYPTION_KEYSTORE));
}
@@ -66,4 +67,9 @@ TestInternalComponentsFactory::BuildDirectoryBackingStore(
return scoped_ptr<syncable::DirectoryBackingStore>();
}
+InternalComponentsFactory::Switches
+TestInternalComponentsFactory::GetSwitches() const {
+ return switches_;
+}
+
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698