summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/sync_manager_impl.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/sync_manager_impl.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/sync_manager_impl.h')
-rw-r--r--sync/internal_api/sync_manager_impl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h
index bcb2c97..f3a57a1 100644
--- a/sync/internal_api/sync_manager_impl.h
+++ b/sync/internal_api/sync_manager_impl.h
@@ -65,7 +65,6 @@ class SyncManagerImpl : public 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,
SyncManager::ChangeDelegate* change_delegate,
@@ -221,11 +220,10 @@ class SyncManagerImpl : public SyncManager,
// Open the directory named with username_for_share
bool OpenDirectory();
- // Sign into sync with given credentials.
- // We do not verify the tokens given. After this call, the tokens are set
- // and the sync DB is open. True if successful, false if something
- // went wrong.
- bool SignIn(const SyncCredentials& credentials);
+ // Purge those types from |previously_enabled_types| that are no longer
+ // enabled in |currently_enabled_types|.
+ bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types,
+ ModelTypeSet currently_enabled_types);
void RequestNudgeForDataTypes(
const tracked_objects::Location& nudge_location,