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

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: Remove ENTRY_POINT_NONE 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/tools/chromeactions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b2978e0e0baab0c972740e5c1a8a3abbcf29e4bf..432d9025fbed7a9df276209896711e3695b32683 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;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/tools/chromeactions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698