summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/sync_manager.h
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 04:37:48 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 04:37:48 +0000
commit62c28b9b77bb585b190ec8afaef43d5bcb764c79 (patch)
tree0081e6a5f3f5c3822929355cf6ef41b955c78d9b /sync/internal_api/public/sync_manager.h
parente841d0622eb6119d407d4acf4eeb6402c7c49ea8 (diff)
downloadchromium_src-62c28b9b77bb585b190ec8afaef43d5bcb764c79.zip
chromium_src-62c28b9b77bb585b190ec8afaef43d5bcb764c79.tar.gz
chromium_src-62c28b9b77bb585b190ec8afaef43d5bcb764c79.tar.bz2
Make SyncBackendRegistrar aware of loaded data
Adds a parameter to the SyncManager::Initialize() callback to inform the caller which sync data types were successfully loaded from disk. This allows the SyncBackendHost and related classes make better decisions during initialization. If necessary, the SyncBackendHost will send a configure request to the syncer during early initialization asking it to download the nigori node. Now we can guarantee that the node will be available by the type ProfileSyncService::OnBackendInitialized() is called. The SyncBackendHost test expectations had to be amended to account for this test. Most of the changes are related to the fact that our behaviour no longer depends on the SyncPrefs. The ProfileSyncService*Tests were very much affected by this change. Those tests are parameterized with a callback that is used to initialize the sync DB and pretend that it had been loaded from disk. Previously, this callback would be executed later on during initialization, around the time of ProfileSyncService::OnBackendInitialize(). That approach was incompatible with this change, which requires that we have access to the fully initialized database around the time we return from SyncBackendHost::Initialize(). The callback had to be moved, which meant that it now required an explicit UserShare parameter, which meant that a lot of call sites had to be updated. BUG=129825 TEST= Review URL: https://chromiumcodereview.appspot.com/10804039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148926 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sync_manager.h')
-rw-r--r--sync/internal_api/public/sync_manager.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 0429697..2cbbd5c 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -298,7 +298,9 @@ class SyncManager {
// function getChildNodeIds(id);
virtual void OnInitializationComplete(
- const WeakHandle<JsBackend>& js_backend, bool success) = 0;
+ const WeakHandle<syncer::JsBackend>& js_backend,
+ bool success,
+ syncer::ModelTypeSet restored_types) = 0;
// We are no longer permitted to communicate with the server. Sync should
// be disabled and state cleaned up at once. This can happen for a number
@@ -369,7 +371,6 @@ class SyncManager {
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
scoped_ptr<HttpPostProviderFactory> post_factory,
- const ModelSafeRoutingInfo& model_safe_routing_info,
const std::vector<ModelSafeWorker*>& workers,
ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,