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

Unified Diff: chrome/renderer/autofill/password_generation_manager.cc

Issue 10787023: Adding UMA stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/renderer/autofill/password_generation_manager.cc
diff --git a/chrome/renderer/autofill/password_generation_manager.cc b/chrome/renderer/autofill/password_generation_manager.cc
index 7e402e2e5e2dadaa116935d02602de58b73bffe0..71d1bcc3cb33c7401d2ac3ae277d728e8e61df37 100644
--- a/chrome/renderer/autofill/password_generation_manager.cc
+++ b/chrome/renderer/autofill/password_generation_manager.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/autofill/password_generation_manager.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "chrome/common/autofill_messages.h"
#include "chrome/common/net/gaia/gaia_urls.h"
#include "content/public/renderer/render_view.h"
@@ -115,6 +116,7 @@ void PasswordGenerationManager::DidFinishLoad(WebKit::WebFrame* frame) {
std::vector<WebKit::WebInputElement> passwords;
if (GetAccountCreationPasswordFields(forms[i], &passwords)) {
DVLOG(2) << "Account creation form detected";
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.AccountCreationFormDetected", 1);
passwords_ = passwords;
account_creation_form_origin_ = password_form->origin;
MaybeShowIcon();
@@ -227,6 +229,7 @@ void PasswordGenerationManager::MaybeShowIcon() {
if (*it == account_creation_form_origin_) {
passwords_[0].decorationElementFor(this).setAttribute("style",
"display:block");
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.PasswordGenerationIconShown", 1);
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698