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

Unified Diff: chrome/browser/ui/views/location_bar/star_view.cc

Issue 10917062: Add bookmark entry point histogram for bookmark prompt experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build break Created 8 years, 3 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/location_bar/star_view.cc
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index e94f2fad7f526e18044340600542c697404bc59b..095d4935ead91db7d7a6d515796cd24c453e75f7 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/ui/views/location_bar/star_view.h"
+#include "base/metrics/histogram.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
@@ -58,12 +60,19 @@ bool StarView::OnMousePressed(const ui::MouseEvent& event) {
}
void StarView::OnMouseReleased(const ui::MouseEvent& event) {
- if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location()))
+ if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
+ UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
+ bookmark_utils::ENTRY_POINT_STAR_MOUSE,
+ bookmark_utils::ENTRY_POINT_LIMIT);
command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
+ }
}
ui::EventResult StarView::OnGestureEvent(const ui::GestureEvent& event) {
if (event.type() == ui::ET_GESTURE_TAP) {
+ UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
+ bookmark_utils::ENTRY_POINT_STAR_GESTURE,
+ bookmark_utils::ENTRY_POINT_LIMIT);
command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
return ui::ER_CONSUMED;
}
@@ -73,6 +82,9 @@ ui::EventResult StarView::OnGestureEvent(const ui::GestureEvent& event) {
bool StarView::OnKeyPressed(const ui::KeyEvent& event) {
if (event.key_code() == ui::VKEY_SPACE ||
event.key_code() == ui::VKEY_RETURN) {
+ UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
+ bookmark_utils::ENTRY_POINT_STAR_KEY,
+ bookmark_utils::ENTRY_POINT_LIMIT);
command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
return true;
}
« chrome/browser/bookmarks/bookmark_utils.h ('K') | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698