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

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: 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/browser/ui/gtk/password_generation_bubble_gtk.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..813bc24dbe47dcf1054b25cccdd18c2049e29711 100644
--- a/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
@@ -93,7 +93,7 @@ PasswordGenerationBubbleGtk::PasswordGenerationBubbleGtk(
BubbleGtk::POPUP_WINDOW |
BubbleGtk::GRAB_INPUT,
GtkThemeService::GetFrom(tab_->profile()),
- NULL); // delegate
+ this); // delegate
g_signal_connect(content, "destroy",
G_CALLBACK(&OnDestroyThunk), this);
@@ -101,12 +101,20 @@ 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);
}
PasswordGenerationBubbleGtk::~PasswordGenerationBubbleGtk() {}
+void PasswordGenerationBubbleGtk::BubbleClosing(
+ BubbleGtk* bubble,
+ bool closed_by_escape) {
+ password_generation::LogUserActions(actions_);
+}
+
void PasswordGenerationBubbleGtk::OnDestroy(GtkWidget* widget) {
// We are self deleting, we have a destroy signal setup to catch when we are
// destroyed (via the BubbleGtk being destroyed), and delete ourself.
@@ -114,6 +122,7 @@ void PasswordGenerationBubbleGtk::OnDestroy(GtkWidget* widget) {
}
void PasswordGenerationBubbleGtk::OnAcceptClicked(GtkWidget* widget) {
+ actions_.password_accepted = true;
RenderViewHost* render_view_host = tab_->web_contents()->GetRenderViewHost();
render_view_host->Send(new AutofillMsg_GeneratedPasswordAccepted(
render_view_host->GetRoutingID(),
@@ -128,9 +137,15 @@ void PasswordGenerationBubbleGtk::OnRegenerateClicked(
GdkEvent* event) {
gtk_entry_set_text(GTK_ENTRY(text_field_),
password_generator_->Generate().c_str());
+ actions_.password_regenerated = true;
+}
+
+void PasswordGenerationBubbleGtk::OnPasswordEdited(GtkWidget* widget) {
+ actions_.password_edited = true;
}
void PasswordGenerationBubbleGtk::OnLearnMoreLinkClicked(GtkButton* button) {
+ actions_.learn_more_visited = true;
Browser* browser = browser::FindBrowserWithWebContents(tab_->web_contents());
content::OpenURLParams params(
GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(),
« no previous file with comments | « chrome/browser/ui/gtk/password_generation_bubble_gtk.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698