diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 23:21:59 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 23:21:59 +0000 |
commit | 2fdf6199cda564079bf743bf98e6c7b8205fc9c4 (patch) | |
tree | 26cb5feaaf3800771b98355450d0a1e37bb0753c /sync/internal_api/sync_manager_impl.h | |
parent | 0e416c45ad5b75728e696b73651f444135c9748f (diff) | |
download | chromium_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/sync_manager_impl.h')
-rw-r--r-- | sync/internal_api/sync_manager_impl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index 2a71344..4ed0b97 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -31,6 +31,7 @@ namespace syncer { +class ModelTypeRegistry; class SyncAPIServerConnectionManager; class WriteNode; class WriteTransaction; @@ -313,6 +314,10 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : // client (the Syncer) and the sync server. scoped_ptr<SyncAPIServerConnectionManager> connection_manager_; + // Maintains state that affects the way we interact with different sync types. + // This state changes when entering or exiting a configuration cycle. + scoped_ptr<ModelTypeRegistry> model_type_registry_; + // A container of various bits of information used by the SyncScheduler to // create SyncSessions. Must outlive the SyncScheduler. scoped_ptr<sessions::SyncSessionContext> session_context_; |