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

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

Issue 643493003: [Password Generation] Update UMA stats for popups per page not per event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 b777c9c420815f295a49f5355995fb4e23b9ddfa..1bdd7b51521d8afc67e86ab2b23ebd0cf1a5fbf4 100644
--- a/components/autofill/content/renderer/password_generation_agent.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -102,6 +102,8 @@ PasswordGenerationAgent::PasswordGenerationAgent(
render_view_(render_view),
password_is_generated_(false),
password_edited_(false),
+ generation_popup_shown_(false),
+ editing_popup_shown_(false),
enabled_(password_generation::IsPasswordGenerationEnabled()) {
DVLOG(2) << "Password Generation is " << (enabled_ ? "Enabled" : "Disabled");
}
@@ -128,6 +130,18 @@ void PasswordGenerationAgent::DidFinishDocumentLoad(
password_generation::PASSWORD_EDITED);
}
password_edited_ = false;
+
+ if (generation_popup_shown_) {
+ password_generation::LogPasswordGenerationEvent(
+ password_generation::GENERATION_POPUP_SHOWN);
+ }
+ generation_popup_shown_ = false;
+
+ if (editing_popup_shown_) {
+ password_generation::LogPasswordGenerationEvent(
+ password_generation::EDITING_POPUP_SHOWN);
+ }
Ilya Sherman 2014/10/09 22:03:58 Please rename the corresponding histogram, since i
Garrett Casto 2014/10/14 18:40:05 Done.
+ editing_popup_shown_ = false;
}
}
@@ -352,8 +366,7 @@ void PasswordGenerationAgent::ShowGenerationPopup() {
generation_element_.maxLength(),
*possible_account_creation_form_));
- password_generation::LogPasswordGenerationEvent(
- password_generation::GENERATION_POPUP_SHOWN);
+ generation_popup_shown_ = true;
}
void PasswordGenerationAgent::ShowEditingPopup() {
@@ -366,8 +379,7 @@ void PasswordGenerationAgent::ShowEditingPopup() {
bounding_box_scaled,
*possible_account_creation_form_));
- password_generation::LogPasswordGenerationEvent(
- password_generation::EDITING_POPUP_SHOWN);
+ editing_popup_shown_ = true;
}
void PasswordGenerationAgent::HidePopup() {

Powered by Google App Engine
This is Rietveld 408576698