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

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

Issue 2673393002: Don't change the HTTPS PasswordForm::action during HTTP -> HTTPS migration. (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: components/password_manager/core/browser/http_password_migrator.cc
diff --git a/components/password_manager/core/browser/http_password_migrator.cc b/components/password_manager/core/browser/http_password_migrator.cc
index 8f5552ad1f24b1cd5f5bdce02aa2933553db566a..da6eb67c31a7c4e0aeae847c8b5dce85a67a325a 100644
--- a/components/password_manager/core/browser/http_password_migrator.cc
+++ b/components/password_manager/core/browser/http_password_migrator.cc
@@ -47,7 +47,10 @@ void HttpPasswordMigrator::OnGetPasswordStoreResults(
rep.SetSchemeStr(url::kHttpsScheme);
form->origin = form->origin.ReplaceComponents(rep);
form->signon_realm = form->origin.spec();
- form->action = form->origin;
+ // If |action| is not HTTPS then it's most likely obsolete. Otherwise, it
+ // may still be valid.
+ if (!form->action.SchemeIs(url::kHttpsScheme))
+ form->action = form->origin;
form->form_data = autofill::FormData();
form->generation_upload_status = autofill::PasswordForm::NO_SIGNAL_SENT;
form->skip_zero_click = false;

Powered by Google App Engine
This is Rietveld 408576698