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

Unified Diff: chrome/browser/sync/glue/password_data_type_controller.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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/password_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/password_data_type_controller.cc b/chrome/browser/sync/glue/password_data_type_controller.cc
index c48386077ced4614d367446e4d3b5fd85085bb89..b43b5ba277a9e1a59a0de4a84c71b329c41d70d2 100644
--- a/chrome/browser/sync/glue/password_data_type_controller.cc
+++ b/chrome/browser/sync/glue/password_data_type_controller.cc
@@ -43,6 +43,16 @@ void PasswordDataTypeController::Start(StartCallback* start_callback) {
return;
}
+ password_store_ = profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ if (!password_store_.get()) {
+ LOG(ERROR) << "PasswordStore not initialized, password datatype controller"
+ << " aborting.";
+ state_ = NOT_RUNNING;
+ start_callback->Run(ABORTED);
+ delete start_callback;
+ return;
+ }
+
if (!sync_service_->IsCryptographerReady()) {
start_callback->Run(NEEDS_CRYPTO);
delete start_callback;
@@ -50,10 +60,7 @@ void PasswordDataTypeController::Start(StartCallback* start_callback) {
}
start_callback_.reset(start_callback);
-
set_state(ASSOCIATING);
- password_store_ = profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
- DCHECK(password_store_.get());
password_store_->ScheduleTask(
NewRunnableMethod(this, &PasswordDataTypeController::StartImpl));
}
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698