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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 6250135: [SYNC] Fix handling of password store corruption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. Created 9 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: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 9230c2cd9e1eff6d32d79c315f49e7434e10812f..13e3a4275ab37c973d692a9c311032b935414aac 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -111,6 +111,14 @@ void SyncBackendHost::Initialize(
profile_->GetHistoryService(Profile::IMPLICIT_ACCESS));
}
+ // Any datatypes that we want the syncer to pull down must
+ // be in the routing_info map. We set them to group passive, meaning that
+ // updates will be applied, but not dispatched to the UI thread yet.
+ for (syncable::ModelTypeSet::const_iterator it = types.begin();
+ it != types.end(); ++it) {
+ registrar_.routing_info[(*it)] = GROUP_PASSIVE;
+ }
+
PasswordStore* password_store =
profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS);
if (password_store) {
@@ -118,14 +126,7 @@ void SyncBackendHost::Initialize(
new PasswordModelWorker(password_store);
} else {
LOG(WARNING) << "Password store not initialized, cannot sync passwords";
- }
-
- // Any datatypes that we want the syncer to pull down must
- // be in the routing_info map. We set them to group passive, meaning that
- // updates will be applied, but not dispatched to the UI thread yet.
- for (syncable::ModelTypeSet::const_iterator it = types.begin();
- it != types.end(); ++it) {
- registrar_.routing_info[(*it)] = GROUP_PASSIVE;
+ registrar_.routing_info.erase(syncable::PASSWORDS);
}
// TODO(tim): Remove this special case once NIGORI is populated by

Powered by Google App Engine
This is Rietveld 408576698