summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 19:24:42 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 19:24:42 +0000
commit8e7f70c52753adb0be14cdba4e78a3d5d86e27da (patch)
treec921a9014cf9f14c76a65efa5bd45ecbef2094d6
parentb1328bab31fcbe5023670f522f400b7488319b6f (diff)
downloadchromium_src-8e7f70c52753adb0be14cdba4e78a3d5d86e27da.zip
chromium_src-8e7f70c52753adb0be14cdba4e78a3d5d86e27da.tar.gz
chromium_src-8e7f70c52753adb0be14cdba4e78a3d5d86e27da.tar.bz2
Adding user metrics for context menus within the bookmarks bar.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3887001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63085 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/bookmarks/bookmark_button_cell.mm9
-rw-r--r--chrome/tools/chromeactions.txt2
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/cocoa/bookmarks/bookmark_button_cell.mm
index cb97411..8cb59e9 100644
--- a/chrome/browser/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/cocoa/bookmarks/bookmark_button_cell.mm
@@ -12,6 +12,7 @@
#import "chrome/browser/cocoa/bookmarks/bookmark_menu.h"
#import "chrome/browser/cocoa/bookmarks/bookmark_button.h"
#import "chrome/browser/cocoa/image_utils.h"
+#include "chrome/browser/metrics/user_metrics.h"
#include "grit/generated_resources.h"
@@ -143,7 +144,15 @@
BookmarkMenu* menu = (BookmarkMenu*)[super menu];
const BookmarkNode* node =
static_cast<const BookmarkNode*>([[self representedObject] pointerValue]);
+
+ if (node->GetParent() && node->GetParent()->type() == BookmarkNode::FOLDER) {
+ UserMetrics::RecordAction(UserMetricsAction("BookmarkBarFolder_CtxMenu"));
+ } else {
+ UserMetrics::RecordAction(UserMetricsAction("BookmarkBar_CtxMenu"));
+ }
+
[menu setRepresentedObject:[NSNumber numberWithLongLong:node->id()]];
+
return menu;
}
diff --git a/chrome/tools/chromeactions.txt b/chrome/tools/chromeactions.txt
index 70bcde6..5781e2c 100644
--- a/chrome/tools/chromeactions.txt
+++ b/chrome/tools/chromeactions.txt
@@ -49,6 +49,7 @@
0x1d145f0af708242c BlockNonsandboxedPlugins_Disable
0xd80cc9291c9c82a9 BlockNonsandboxedPlugins_Enable
0x114c3050111d8b8d Bold
+0x02f476e54c6d58bd BookmarkBarFolder_CtxMenu
0x3012b56b98c28823 BookmarkBarFolder_DragEnd
0xe71c0ba72ca2f331 BookmarkBarFolder_DragStart
0x4213d5e4d5da1c0a BookmarkBar_ContextMenu_Add
@@ -63,6 +64,7 @@
0xd8a39c089af645f1 BookmarkBar_ContextMenu_Remove
0xa90364ba80763db0 BookmarkBar_ContextMenu_RemoveFromBookmarkBar
0xa905159308ac6adc BookmarkBar_ContextMenu_ShowInFolder
+0x07801d0423d26682 BookmarkBar_CtxMenu
0x8623e5f54147dbe6 BookmarkBar_DragButton
0x4b37738130b32b3e BookmarkBar_DragEnd
0x6c0fc567d362960e BookmarkBar_DragFromFolder