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

Unified Diff: chrome/browser/ui/gtk/password_generation_bubble_gtk.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/browser/ui/gtk/password_generation_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc b/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
index 0f99f895a06879507e120c2fef5c7fda802f40a0..73c850503ebaaac18e9a4b439fbd6519ca708390 100644
--- a/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/gtk/password_generation_bubble_gtk.h"
+#include "base/metrics/histogram.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/password_generator.h"
#include "chrome/browser/password_manager/password_manager.h"
@@ -94,6 +95,8 @@ PasswordGenerationBubbleGtk::PasswordGenerationBubbleGtk(
BubbleGtk::GRAB_INPUT,
GtkThemeService::GetFrom(tab_->profile()),
NULL); // delegate
+ UMA_HISTOGRAM_COUNTS(
+ "PasswordGeneration.PasswordGenerationBubbleShown_Linux", 1);
Garrett Casto 2012/07/16 22:32:39 You can break down UMA stats by OS so you don't ne
zysxqn 2012/07/18 01:01:00 Done.
g_signal_connect(content, "destroy",
G_CALLBACK(&OnDestroyThunk), this);
@@ -101,6 +104,8 @@ PasswordGenerationBubbleGtk::PasswordGenerationBubbleGtk(
G_CALLBACK(&OnAcceptClickedThunk), this);
g_signal_connect(text_field_, "icon-press",
G_CALLBACK(&OnRegenerateClickedThunk), this);
+ g_signal_connect(text_field_, "changed",
+ G_CALLBACK(&OnPasswordEditedThunk), this);
g_signal_connect(learn_more_link, "clicked",
G_CALLBACK(OnLearnMoreLinkClickedThunk), this);
}
@@ -114,6 +119,7 @@ void PasswordGenerationBubbleGtk::OnDestroy(GtkWidget* widget) {
}
void PasswordGenerationBubbleGtk::OnAcceptClicked(GtkWidget* widget) {
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.PasswordAccepted", 1);
RenderViewHost* render_view_host = tab_->web_contents()->GetRenderViewHost();
render_view_host->Send(new AutofillMsg_GeneratedPasswordAccepted(
render_view_host->GetRoutingID(),
@@ -126,11 +132,17 @@ void PasswordGenerationBubbleGtk::OnRegenerateClicked(
GtkWidget* widget,
GtkEntryIconPosition icon_pos,
GdkEvent* event) {
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.RegenerationButtonClicked", 1);
gtk_entry_set_text(GTK_ENTRY(text_field_),
password_generator_->Generate().c_str());
}
+void PasswordGenerationBubbleGtk::OnPasswordEdited(GtkWidget* widget) {
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.PasswordEditedByUsers", 1);
Garrett Casto 2012/07/16 22:32:39 I would think that we would want to know if the pa
zysxqn 2012/07/18 01:01:00 Done.
+}
+
void PasswordGenerationBubbleGtk::OnLearnMoreLinkClicked(GtkButton* button) {
+ UMA_HISTOGRAM_COUNTS("PasswordGeneration.LearnMoreLinkClicked", 1);
Browser* browser = browser::FindBrowserWithWebContents(tab_->web_contents());
content::OpenURLParams params(
GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(),

Powered by Google App Engine
This is Rietveld 408576698