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

Unified Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 9969141: Add FirstRun.SearchEngineBubble UMA histogram counts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a histogram instead; also count impressions. Created 8 years, 9 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/views/first_run_bubble.cc
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index 912b6408ad1aa7ff0f26f18808733a726273b9e8..c825b5f8b191b5ad8c032796767bb847f4e9b26f 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/ui/views/first_run_bubble.h"
+#include "base/metrics/histogram.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/search_engines/util.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/views/window.h"
@@ -31,6 +33,10 @@ namespace first_run {
// static
FirstRunBubble* FirstRunBubble::ShowBubble(Profile* profile,
views::View* anchor_view) {
+ HISTOGRAM_ENUMERATION("FirstRun.SearchEngineBubble",
+ first_run::FIRST_RUN_BUBBLE_SHOWN,
+ first_run::NUM_FIRST_RUN_BUBBLE_METRICS);
+
FirstRunBubble* delegate = new FirstRunBubble(profile, anchor_view);
browser::CreateViewsBubble(delegate);
delegate->StartFade(true);
@@ -90,6 +96,10 @@ FirstRunBubble::~FirstRunBubble() {
}
void FirstRunBubble::LinkClicked(views::Link* source, int event_flags) {
+ HISTOGRAM_ENUMERATION("FirstRun.SearchEngineBubble",
+ first_run::FIRST_RUN_BUBBLE_CHANGE_SEARCH_INVOKED,
+ first_run::NUM_FIRST_RUN_BUBBLE_METRICS);
+
// Get |profile_|'s browser before closing the bubble, which deletes |this|.
Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
GetWidget()->Close();

Powered by Google App Engine
This is Rietveld 408576698