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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 2187253002: [Password Manager] Change signature of PasswordAutofillAgent.FillSuggestion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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/autofill/content/renderer/password_autofill_agent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 646ea2d9aee4f1b8b873c8150217a6fc519388b0..138c8d01e024aa121d2ed5e7c9f56e3d25a58471 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -727,8 +727,8 @@ void PasswordAutofillAgent::UpdateStateForTextChange(
bool PasswordAutofillAgent::FillSuggestion(
const blink::WebFormControlElement& control_element,
- const blink::WebString& username,
- const blink::WebString& password) {
+ const base::string16& username,
+ const base::string16& password) {
// The element in context of the suggestion popup.
const blink::WebInputElement* element = toWebInputElement(&control_element);
if (!element)
@@ -751,18 +751,16 @@ bool PasswordAutofillAgent::FillSuggestion(
password_info->password_field_suggestion_was_accepted = true;
password_info->password_field = password_element;
} else if (!username_element.isNull()) {
- username_element.setValue(username, true);
+ username_element.setValue(blink::WebString(username), true);
username_element.setAutofilled(true);
- const base::string16 username_value = username;
- UpdateFieldValueAndPropertiesMaskMap(username_element, &username_value,
+ UpdateFieldValueAndPropertiesMaskMap(username_element, &username,
FieldPropertiesFlags::AUTOFILLED,
&field_value_and_properties_map_);
}
- password_element.setValue(password, true);
+ password_element.setValue(blink::WebString(password), true);
password_element.setAutofilled(true);
- const base::string16 password_value = password;
- UpdateFieldValueAndPropertiesMaskMap(password_element, &password_value,
+ UpdateFieldValueAndPropertiesMaskMap(password_element, &password,
FieldPropertiesFlags::AUTOFILLED,
&field_value_and_properties_map_);
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698