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

Unified Diff: components/password_manager/core/browser/credential_manager_pending_request_task.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/credential_manager_pending_request_task.cc
diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.cc b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
index 63c79bb0a5c1991f5cd2c98e7263994ed10f0f59..71b7400b6e756fd9160a693f95227786e2396ea0 100644
--- a/components/password_manager/core/browser/credential_manager_pending_request_task.cc
+++ b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
@@ -132,10 +132,14 @@ CredentialManagerPendingRequestTask::~CredentialManagerPendingRequestTask() =
void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
if (results.empty()) {
+ const auto migration_mode =
+ delegate_->client()->IsHSTSActiveForHost(origin_)
+ ? HttpPasswordMigrator::MigrationMode::MOVE
+ : HttpPasswordMigrator::MigrationMode::COPY;
+
// Try to migrate the HTTP passwords and process them later.
http_migrator_ = base::MakeUnique<HttpPasswordMigrator>(
- origin_, HttpPasswordMigrator::MigrationMode::COPY,
- delegate_->client()->GetPasswordStore(), this);
+ origin_, migration_mode, delegate_->client()->GetPasswordStore(), this);
return;
}
ProcessForms(std::move(results));

Powered by Google App Engine
This is Rietveld 408576698