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

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

Issue 2806293005: Fix a DCHECK in HttpPasswordStoreMigrator for localhost. (Closed)
Patch Set: Created 3 years, 8 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 | « components/password_manager/content/browser/credential_manager_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ae1279ab3402dc1477e2263d2fec1016d974e1f5..cd89fb0e8944e82d0672935d01da590f1cdb4e90 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
@@ -131,7 +131,8 @@ CredentialManagerPendingRequestTask::~CredentialManagerPendingRequestTask() =
void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
- if (results.empty()) {
+ // localhost is a secure origin but not https.
+ if (results.empty() && origin_.SchemeIs(url::kHttpsScheme)) {
// Try to migrate the HTTP passwords and process them later.
http_migrator_ = base::MakeUnique<HttpPasswordStoreMigrator>(
origin_, delegate_->client(), this);
« no previous file with comments | « components/password_manager/content/browser/credential_manager_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698