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

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: Don't update histograms in the renderer. 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..258a153ea9f70082cdcd478302b6d3e3605dd7c6 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 "chrome/browser/ui/password_generation_status.h"
Ilya Sherman 2012/07/18 20:48:57 chrome/renderer should not include any headers fro
zysxqn 2012/07/18 22:46:17 Moved to chrome/common and renamed it to password_
#include "chrome/common/autofill_messages.h"
#include "chrome/common/net/gaia/gaia_urls.h"
#include "content/public/renderer/render_view.h"
@@ -115,6 +116,8 @@ void PasswordGenerationManager::DidFinishLoad(WebKit::WebFrame* frame) {
std::vector<WebKit::WebInputElement> passwords;
if (GetAccountCreationPasswordFields(forms[i], &passwords)) {
DVLOG(2) << "Account creation form detected";
+ password_generation::UpdateEventsHistogram(
+ password_generation::SIGN_UP_DETECTED);
passwords_ = passwords;
account_creation_form_origin_ = password_form->origin;
MaybeShowIcon();
@@ -168,6 +171,8 @@ void PasswordGenerationManager::handleClick(WebKit::WebInputElement& element) {
rect,
element.maxLength(),
*password_form));
+ password_generation::UpdateEventsHistogram(
+ password_generation::BUBBLE_SHOWN);
}
}
@@ -227,6 +232,8 @@ void PasswordGenerationManager::MaybeShowIcon() {
if (*it == account_creation_form_origin_) {
passwords_[0].decorationElementFor(this).setAttribute("style",
"display:block");
+ password_generation::UpdateEventsHistogram(
+ password_generation::ICON_SHOWN);
return;
}
}
« chrome/browser/ui/password_generation_status.cc ('K') | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698