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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 439903002: [Sync] Move reenable logic into DTM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 985126b6070024634e25897952c8ce41ece361d1..ef8d9b3658c98d5b016804ae56eb3e2bd18a952d 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -949,21 +949,8 @@ void ProfileSyncService::OnUnrecoverableErrorImpl(
}
void ProfileSyncService::ReenableDatatype(syncer::ModelType type) {
- // Only reconfigure if the type actually had a data type or unready error.
- if (!failed_data_types_handler_.ResetDataTypeErrorFor(type) &&
- !failed_data_types_handler_.ResetUnreadyErrorFor(type)) {
- return;
- }
-
- // If the type is no longer enabled, don't bother reconfiguring.
- // TODO(zea): something else should encapsulate the notion of "whether a type
- // should be enabled".
- if (!syncer::CoreTypes().Has(type) && !GetPreferredDataTypes().Has(type))
- return;
-
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&ProfileSyncService::ReconfigureDatatypeManager,
- weak_factory_.GetWeakPtr()));
+ DCHECK(backend_initialized_);
+ directory_data_type_manager_->ReenableType(type);
maniscalco 2014/08/04 23:59:30 I noticed that elsewhere in this class we check th
Nicolas Zea 2014/08/06 21:20:08 At the moment I've taking the opinion that it's in
}
void ProfileSyncService::UpdateBackendInitUMA(bool success) {
« no previous file with comments | « no previous file | components/sync_driver/data_type_manager.h » ('j') | components/sync_driver/data_type_manager_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698