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

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

Issue 1184913002: [Password Manager] Suppress UI when password generation is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 6 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_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index ea8944a26a098cfda0842c0c72e8096fd047d984..2ca8aad8d43561aea5f053bb80ead8aa08b127c7 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -838,7 +838,8 @@ bool PasswordAutofillAgent::FindPasswordInfoForElement(
bool PasswordAutofillAgent::ShowSuggestions(
const blink::WebInputElement& element,
- bool show_all) {
+ bool show_all,
+ bool generation_popup_showing) {
const blink::WebInputElement* username_element;
PasswordInfo* password_info;
if (!FindPasswordInfoForElement(element, &username_element, &password_info))
@@ -861,6 +862,13 @@ bool PasswordAutofillAgent::ShowSuggestions(
if (element.isPasswordField() && username_is_available)
return true;
+ UMA_HISTOGRAM_BOOLEAN(
+ "PasswordManager.AutocompletePopupSuppressedByGeneration",
+ generation_popup_showing);
+
+ if (generation_popup_showing)
+ return false;
+
// Chrome should never show more than one account for a password element since
// this implies that the username element cannot be modified. Thus even if
// |show_all| is true, check if the element in question is a password element
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698