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

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

Issue 1686063004: Sending generated vote on password generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments update Created 4 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/autofill/content/renderer/password_generation_agent.cc
diff --git a/components/autofill/content/renderer/password_generation_agent.cc b/components/autofill/content/renderer/password_generation_agent.cc
index ded1af01e2087b4e339bdfe93ffda97c481149dc..02df384c7f8534cc86bb0f28e348f760d7fcdc0b 100644
--- a/components/autofill/content/renderer/password_generation_agent.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -120,6 +120,7 @@ PasswordGenerationAgent::PasswordGenerationAgent(
PasswordAutofillAgent* password_agent)
: content::RenderFrameObserver(render_frame),
password_is_generated_(false),
+ is_manually_triggered(false),
password_edited_(false),
generation_popup_shown_(false),
editing_popup_shown_(false),
@@ -438,11 +439,13 @@ bool PasswordGenerationAgent::TextDidChangeInTextField(
void PasswordGenerationAgent::ShowGenerationPopup() {
Send(new AutofillHostMsg_ShowPasswordGenerationPopup(
- routing_id(),
- render_frame()->GetRenderView()->ElementBoundsInWindow(
- generation_element_),
- generation_element_.maxLength(),
- *generation_form_data_->form));
+ routing_id(),
+ render_frame()->GetRenderView()->ElementBoundsInWindow(
+ generation_element_),
+ generation_element_.maxLength(),
+ generation_element_.nameForAutofill(),
+ is_manually_triggered,
+ *generation_form_data_->form));
generation_popup_shown_ = true;
}
@@ -485,6 +488,7 @@ void PasswordGenerationAgent::OnGeneratePassword() {
password_elements, element->nameForAutofill());
generation_form_data_.reset(new AccountCreationFormData(
make_linked_ptr(password_form.release()), password_elements));
+ is_manually_triggered = true;
vabr (Chromium) 2016/02/17 13:43:22 nit: Currently this method is only called when the
dvadym 2016/02/19 16:25:05 Thanks, it makes perfect sense, I've renamed to Us
ShowGenerationPopup();
}

Powered by Google App Engine
This is Rietveld 408576698