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

Unified Diff: chrome/browser/password_manager/password_store_proxy_mac.cc

Issue 2729853005: Stop password migration from the Keychain on Mac. (Closed)
Patch Set: Created 3 years, 10 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/password_manager/password_store_proxy_mac.cc
diff --git a/chrome/browser/password_manager/password_store_proxy_mac.cc b/chrome/browser/password_manager/password_store_proxy_mac.cc
index 44d67bdfd8861d6c1d3ba69c97686d68f7ff231f..cb78af3a157f310c0b67dbcdb1c63d9300506301 100644
--- a/chrome/browser/password_manager/password_store_proxy_mac.cc
+++ b/chrome/browser/password_manager/password_store_proxy_mac.cc
@@ -87,18 +87,10 @@ void PasswordStoreProxyMac::InitOnBackgroundThread(MigrationStatus status) {
if (login_metadata_db_ && (status == MigrationStatus::NOT_STARTED ||
status == MigrationStatus::FAILED_ONCE ||
status == MigrationStatus::FAILED_TWICE)) {
- // Let's try to migrate the passwords.
- login_metadata_db_->set_clear_password_values(true);
- auto import_status =
- PasswordStoreMac::ImportFromKeychain(login_metadata_db_.get(),
- keychain_.get());
- if (import_status == PasswordStoreMac::MIGRATION_OK) {
- status = MigrationStatus::MIGRATED;
- } else if (import_status == PasswordStoreMac::MIGRATION_PARTIAL) {
- status = MigrationStatus::MIGRATED_PARTIALLY;
- } else {
- login_metadata_db_.reset();
- }
+ // Migration isn't possible due to Chrome changing the certificate. Just
+ // drop the entries in the DB because they don't have passwords anyway.
+ login_metadata_db_->RemoveLoginsCreatedBetween(base::Time(), base::Time());
+ status = MigrationStatus::MIGRATION_STOPPED;
pending_ui_tasks_.push_back(
base::Bind(&PasswordStoreProxyMac::UpdateStatusPref, this, status));
} else if (login_metadata_db_ && status == MigrationStatus::MIGRATED) {

Powered by Google App Engine
This is Rietveld 408576698