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

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

Issue 2641523004: [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Address comments 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 e52090e8b2f7ffb56c0e841a10f43fce067e233c..b4f52a506c6a00575786a543a03e49887acf923b 100644
--- a/components/sync/engine_impl/sync_manager_impl.cc
+++ b/components/sync/engine_impl/sync_manager_impl.cc
@@ -182,7 +182,6 @@ ModelTypeSet SyncManagerImpl::GetTypesWithEmptyProgressMarkerToken(
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());
@@ -195,12 +194,9 @@ void SyncManagerImpl::ConfigureSyncer(
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,
- new_routing_info, ready_task, retry_task);
+ ready_task, retry_task);
scheduler_->Start(SyncScheduler::CONFIGURATION_MODE, base::Time());
scheduler_->ScheduleConfiguration(params);
@@ -396,18 +392,17 @@ void SyncManagerImpl::OnLocalSetPassphraseEncryption(
const SyncEncryptionHandler::NigoriState& nigori_state) {}
void SyncManagerImpl::StartSyncingNormally(
- const ModelSafeRoutingInfo& routing_info,
base::Time last_poll_time) {
// Start the sync scheduler.
- // 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() {
return share_.directory.get();
}
@@ -906,6 +901,11 @@ UserShare* SyncManagerImpl::GetUserShare() {
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