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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 159371: Add in UMA logging for context menu playback controls. (Closed)
Patch Set: Created 11 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 1c4959f9a4f16ff65e078007788cd68dc808718a..fae6fa3a65210cd0ca4cc40ed187f845aa879150 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/fonts_languages_window.h"
+#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/page_info_window.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/search_engines/template_url_model.h"
@@ -540,30 +541,35 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAY:
+ UserMetrics::RecordAction(L"MediaContextMenu_Play", profile_);
MediaPlayerActionAt(params_.x,
params_.y,
MediaPlayerAction(MediaPlayerAction::PLAY));
break;
case IDS_CONTENT_CONTEXT_PAUSE:
+ UserMetrics::RecordAction(L"MediaContextMenu_Pause", profile_);
MediaPlayerActionAt(params_.x,
params_.y,
MediaPlayerAction(MediaPlayerAction::PAUSE));
break;
case IDS_CONTENT_CONTEXT_MUTE:
+ UserMetrics::RecordAction(L"MediaContextMenu_Mute", profile_);
MediaPlayerActionAt(params_.x,
params_.y,
MediaPlayerAction(MediaPlayerAction::MUTE));
break;
case IDS_CONTENT_CONTEXT_UNMUTE:
+ UserMetrics::RecordAction(L"MediaContextMenu_Unmute", profile_);
MediaPlayerActionAt(params_.x,
params_.y,
MediaPlayerAction(MediaPlayerAction::UNMUTE));
break;
case IDS_CONTENT_CONTEXT_LOOP:
+ UserMetrics::RecordAction(L"MediaContextMenu_Loop", profile_);
if (ItemIsChecked(IDS_CONTENT_CONTEXT_LOOP)) {
MediaPlayerActionAt(params_.x,
params_.y,
@@ -576,6 +582,7 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAYBACKRATE_SLOW:
+ UserMetrics::RecordAction(L"MediaContextMenu_RateSlow", profile_);
MediaPlayerActionAt(
params_.x,
params_.y,
@@ -584,6 +591,7 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAYBACKRATE_NORMAL:
+ UserMetrics::RecordAction(L"MediaContextMenu_RateNormal", profile_);
MediaPlayerActionAt(
params_.x,
params_.y,
@@ -592,6 +600,7 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAYBACKRATE_FAST:
+ UserMetrics::RecordAction(L"MediaContextMenu_RateFast", profile_);
MediaPlayerActionAt(
params_.x,
params_.y,
@@ -600,6 +609,7 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAYBACKRATE_FASTER:
+ UserMetrics::RecordAction(L"MediaContextMenu_RateFaster", profile_);
MediaPlayerActionAt(
params_.x,
params_.y,
@@ -608,6 +618,7 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_PLAYBACKRATE_DOUBLETIME:
+ UserMetrics::RecordAction(L"MediaContextMenu_RateDoubleTime", profile_);
MediaPlayerActionAt(
params_.x,
params_.y,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698