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

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

Issue 169173005: Update incomplete credentials in Login Database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compilation fix for newer master Created 6 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_form_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_form_manager.cc
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index fd361b6e2679e72e3b2a7508336945a80f8c07b2..b999e9543d47c540a21bbc8acb07896d279c7f46 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -238,6 +238,13 @@ void PasswordFormManager::ProvisionallySave(
// bless it with the action URL from the observed form. See bug 1107719.
if (pending_credentials_.action.is_empty())
pending_credentials_.action = observed_form_.action;
+ // Similarly, bless incomplete credentials with *_element info.
+ if (pending_credentials_.password_element.empty())
+ pending_credentials_.password_element = observed_form_.password_element;
+ if (pending_credentials_.username_element.empty())
+ pending_credentials_.username_element = observed_form_.username_element;
+ if (pending_credentials_.submit_element.empty())
+ pending_credentials_.submit_element = observed_form_.submit_element;
pending_credentials_.password_value = credentials.password_value;
pending_credentials_.preferred = credentials.preferred;
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_form_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698