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

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: Fix dcheck 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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 955a4b6eb90c57232cd69c6f1f22a15fef2fbb48..a5d6cdb0de04dbcf3a85548d1251989c2af99d38 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1006,21 +1006,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);
}
void ProfileSyncService::UpdateBackendInitUMA(bool success) {
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698