summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/test
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 23:21:59 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 23:21:59 +0000
commit2fdf6199cda564079bf743bf98e6c7b8205fc9c4 (patch)
tree26cb5feaaf3800771b98355450d0a1e37bb0753c /sync/internal_api/test
parent0e416c45ad5b75728e696b73651f444135c9748f (diff)
downloadchromium_src-2fdf6199cda564079bf743bf98e6c7b8205fc9c4.zip
chromium_src-2fdf6199cda564079bf743bf98e6c7b8205fc9c4.tar.gz
chromium_src-2fdf6199cda564079bf743bf98e6c7b8205fc9c4.tar.bz2
sync: Introduce ModelTypeRegistry and helpers
Introduce the ModelTypeRegistry class and use it to manage the creation of UpdateHandlers and CommitContributors. The ModelTypeRegistry also gets some help from the newly introduced UpdaterList and CommitterList classes. This lets us move the verbose iteration logic out of the code that's focused on building and executing commits and updates, which should make those functions easier to read. It gives us more freedom to experiment with other ways to manage the lists of commit contributors and update handlers, should we choose to do so. It prevents us from leaking the set of enabled types through the per-type maps. This patch is one of the last in the stack related to building a per-type abstraction into the sync engine, and also one of the first steps towards implementing run-time enable and disable logic for the new-style sync types. BUG=278484 Review URL: https://codereview.chromium.org/93433006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/test')
-rw-r--r--sync/internal_api/test/test_internal_components_factory.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sync/internal_api/test/test_internal_components_factory.cc b/sync/internal_api/test/test_internal_components_factory.cc
index b4a5459..2f1367f 100644
--- a/sync/internal_api/test/test_internal_components_factory.cc
+++ b/sync/internal_api/test/test_internal_components_factory.cc
@@ -32,20 +32,21 @@ scoped_ptr<sessions::SyncSessionContext>
TestInternalComponentsFactory::BuildContext(
ServerConnectionManager* connection_manager,
syncable::Directory* directory,
- const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
ExtensionsActivity* monitor,
const std::vector<SyncEngineEventListener*>& listeners,
sessions::DebugInfoGetter* debug_info_getter,
TrafficRecorder* traffic_recorder,
+ ModelTypeRegistry* model_type_registry,
const std::string& invalidator_client_id) {
// Tests don't wire up listeners.
std::vector<SyncEngineEventListener*> empty_listeners;
return scoped_ptr<sessions::SyncSessionContext>(
new sessions::SyncSessionContext(
- connection_manager, directory, workers, monitor,
+ connection_manager, directory, monitor,
empty_listeners, debug_info_getter,
traffic_recorder,
+ model_type_registry,
switches_.encryption_method == ENCRYPTION_KEYSTORE,
switches_.pre_commit_updates_policy ==
FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE,