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

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: A typo. 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
« no previous file with comments | « chrome/common/password_generation_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..767e55153a3f9c8cc4a689dad9683fb04c978692 100644
--- a/chrome/renderer/autofill/password_generation_manager.cc
+++ b/chrome/renderer/autofill/password_generation_manager.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "chrome/common/autofill_messages.h"
#include "chrome/common/net/gaia/gaia_urls.h"
+#include "chrome/common/password_generation_util.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.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::LogPasswordGenerationEvent(
+ password_generation::SIGN_UP_DETECTED);
passwords_ = passwords;
account_creation_form_origin_ = password_form->origin;
MaybeShowIcon();
@@ -122,6 +125,8 @@ void PasswordGenerationManager::DidFinishLoad(WebKit::WebFrame* frame) {
return;
}
}
+ password_generation::LogPasswordGenerationEvent(
+ password_generation::NO_SIGN_UP_DETECTED);
}
bool PasswordGenerationManager::ShouldAnalyzeDocument(
@@ -168,6 +173,8 @@ void PasswordGenerationManager::handleClick(WebKit::WebInputElement& element) {
rect,
element.maxLength(),
*password_form));
+ password_generation::LogPasswordGenerationEvent(
+ password_generation::BUBBLE_SHOWN);
}
}
@@ -227,6 +234,8 @@ void PasswordGenerationManager::MaybeShowIcon() {
if (*it == account_creation_form_origin_) {
passwords_[0].decorationElementFor(this).setAttribute("style",
"display:block");
+ password_generation::LogPasswordGenerationEvent(
+ password_generation::ICON_SHOWN);
return;
}
}
« no previous file with comments | « chrome/common/password_generation_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698