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

Unified Diff: components/password_manager/core/browser/form_fetcher_impl.cc

Issue 2714543006: Clean Obsolete HTTP Data from the Password Store (Closed)
Patch Set: Actually do the deletion. 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: components/password_manager/core/browser/form_fetcher_impl.cc
diff --git a/components/password_manager/core/browser/form_fetcher_impl.cc b/components/password_manager/core/browser/form_fetcher_impl.cc
index 6bff00d8fc6926e333c0316ff59925cc77ad3387..2d6a388e4e8425288b7ed908d72a0436c780ef5e 100644
--- a/components/password_manager/core/browser/form_fetcher_impl.cc
+++ b/components/password_manager/core/browser/form_fetcher_impl.cc
@@ -110,9 +110,13 @@ void FormFetcherImpl::OnGetPasswordStoreResults(
if (should_migrate_http_passwords_ && results.empty() &&
form_digest_.origin.SchemeIs(url::kHttpsScheme)) {
+ const auto migration_mode =
+ client_->IsHSTSActiveForHost(form_digest_.origin)
+ ? HttpPasswordMigrator::MigrationMode::MOVE
+ : HttpPasswordMigrator::MigrationMode::COPY;
+
http_migrator_ = base::MakeUnique<HttpPasswordMigrator>(
- form_digest_.origin, HttpPasswordMigrator::MigrationMode::COPY,
- client_->GetPasswordStore(), this);
+ form_digest_.origin, migration_mode, client_->GetPasswordStore(), this);
return;
}

Powered by Google App Engine
This is Rietveld 408576698