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

Unified Diff: chrome/browser/ui/views/toolbar/wrench_menu.cc

Issue 700673003: Add metrics to all items in the 'wrench' menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved comments, added histogram suffixes Created 6 years, 1 month 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/toolbar/wrench_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc
index 8c1d8d2293b09547f4c399938418e10cb12e6610..f057fb53696e56ee73249a63f48fe8272a3c8c61 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -8,6 +8,7 @@
#include <cmath>
#include <set>
+#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -1001,6 +1002,10 @@ bool WrenchMenu::IsCommandEnabled(int command_id) const {
void WrenchMenu::ExecuteCommand(int command_id, int mouse_event_flags) {
if (IsBookmarkCommand(command_id)) {
+ UMA_HISTOGRAM_TIMES("WrenchMenu.TimeToAction.BookmarkOpen",
+ menu_opened_timer_.Elapsed());
+ UMA_HISTOGRAM_ENUMERATION("WrenchMenu.MenuAction",
+ MENU_ACTION_BOOKMARK_OPEN, LIMIT_MENU_ACTION);
bookmark_menu_delegate_->ExecuteCommand(command_id, mouse_event_flags);
return;
}

Powered by Google App Engine
This is Rietveld 408576698