Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: components/sync/engine_impl/sync_manager_impl.cc

Issue 2644373003: Revert of [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/engine_impl/sync_manager_impl.cc
diff --git a/components/sync/engine_impl/sync_manager_impl.cc b/components/sync/engine_impl/sync_manager_impl.cc
index b4f52a506c6a00575786a543a03e49887acf923b..e52090e8b2f7ffb56c0e841a10f43fce067e233c 100644
--- a/components/sync/engine_impl/sync_manager_impl.cc
+++ b/components/sync/engine_impl/sync_manager_impl.cc
@@ -182,6 +182,7 @@
void SyncManagerImpl::ConfigureSyncer(
ConfigureReason reason,
ModelTypeSet to_download,
+ const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -194,9 +195,12 @@
DVLOG(1) << "Configuring -"
<< "\n\t"
+ << "current types: "
+ << ModelTypeSetToString(GetRoutingInfoTypes(new_routing_info))
+ << "\n\t"
<< "types to download: " << ModelTypeSetToString(to_download);
ConfigurationParams params(GetSourceFromReason(reason), to_download,
- ready_task, retry_task);
+ new_routing_info, ready_task, retry_task);
scheduler_->Start(SyncScheduler::CONFIGURATION_MODE, base::Time());
scheduler_->ScheduleConfiguration(params);
@@ -392,15 +396,16 @@
const SyncEncryptionHandler::NigoriState& nigori_state) {}
void SyncManagerImpl::StartSyncingNormally(
+ const ModelSafeRoutingInfo& routing_info,
base::Time last_poll_time) {
// Start the sync scheduler.
- DCHECK(thread_checker_.CalledOnValidThread());
+ // TODO(sync): We always want the newest set of routes when we switch back
+ // to normal mode. Figure out how to enforce set_routing_info is always
+ // appropriately set and that it's only modified when switching to normal
+ // mode.
+ DCHECK(thread_checker_.CalledOnValidThread());
+ cycle_context_->SetRoutingInfo(routing_info);
scheduler_->Start(SyncScheduler::NORMAL_MODE, last_poll_time);
-}
-
-void SyncManagerImpl::StartConfiguration() {
- DCHECK(thread_checker_.CalledOnValidThread());
- scheduler_->Start(SyncScheduler::CONFIGURATION_MODE, base::Time());
}
syncable::Directory* SyncManagerImpl::directory() {
@@ -901,11 +906,6 @@
return &share_;
}
-ModelTypeConnector* SyncManagerImpl::GetModelTypeConnector() {
- DCHECK(thread_checker_.CalledOnValidThread());
- return model_type_registry_.get();
-}
-
std::unique_ptr<ModelTypeConnector>
SyncManagerImpl::GetModelTypeConnectorProxy() {
DCHECK(initialized_);
« no previous file with comments | « components/sync/engine_impl/sync_manager_impl.h ('k') | components/sync/engine_impl/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698