summaryrefslogtreecommitdiffstats
path: root/sync/engine/sync_scheduler.h
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 23:06:08 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 23:06:08 +0000
commit5252c891ca0f5e1fad81adcd86d7889ecf0abc9f (patch)
tree3dfbbf52e2072f978683d740a13488860564a553 /sync/engine/sync_scheduler.h
parent418feeea43d284ae95dc022d386fe06e4fb78bc8 (diff)
downloadchromium_src-5252c891ca0f5e1fad81adcd86d7889ecf0abc9f.zip
chromium_src-5252c891ca0f5e1fad81adcd86d7889ecf0abc9f.tar.gz
chromium_src-5252c891ca0f5e1fad81adcd86d7889ecf0abc9f.tar.bz2
Remove sync's ModelSafeWorkerRegistrar
The ModelSafeWorkerRegistrar interface was a wrapper around the SyncBackendRegistrar. When the sync thread wanted to access the SyncBackendRegistrar's information regarding currently enabled types or workers, it would use the ModelSafeWorkerRegistrar interface to do it. This change removes this implicit inter-thread communication. Where necessary, it modifies the SyncBackendHost, SyncManager, SyncScheduler and the SyncSessionContext to ensure that these classes have access to a fresh copy of the SyncBackendRegistrar's data whenever it is required. The most biggest consequence of this patch is that the SyncSessionContext now maintains a copy of the list of ModelSafeWorkers and routing info, rather than a pointer to the ModelSafeWorkerRegistrar. Various functions along the path to CleanupDisabledTypes, Configure and StartSyncingNormally have been updated to ensure that the latest routing info is made available to the session context. Future patches may refactor this code to reduce the amount of duplicated state. This work was intentionally left to future patches to reduce the risk of the current change. The refactoring should be much easier once we're convinced that the new, explicit inter-thread communication mechanisms are no more buggy than the existing code. BUG=103326 TEST=sync_integration_tests Review URL: https://chromiumcodereview.appspot.com/10388187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/sync_scheduler.h')
-rw-r--r--sync/engine/sync_scheduler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index 4ec621d..dfd63e4 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -54,7 +54,7 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
// (except for RequestEarlyExit()).
// |name| is a display string to identify the syncer thread. Takes
- // |ownership of both |context| and |syncer|.
+ // |ownership of |syncer|.
SyncScheduler(const std::string& name,
sessions::SyncSessionContext* context, Syncer* syncer);
@@ -409,7 +409,7 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
// Invoked to run through the sync cycle.
scoped_ptr<Syncer> syncer_;
- scoped_ptr<sessions::SyncSessionContext> session_context_;
+ sessions::SyncSessionContext *session_context_;
DISALLOW_COPY_AND_ASSIGN(SyncScheduler);
};