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

Side by Side Diff: chrome/browser/android/uma_bridge.cc

Issue 455543003: Add MobileUsingMenuBy* metric actions owner and remove an unused one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/uma_bridge.h" 5 #include "chrome/browser/android/uma_bridge.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "content/public/browser/user_metrics.h" 9 #include "content/public/browser/user_metrics.h"
10 #include "jni/UmaBridge_jni.h" 10 #include "jni/UmaBridge_jni.h"
11 11
12 using base::UserMetricsAction; 12 using base::UserMetricsAction;
13 using content::RecordAction; 13 using content::RecordAction;
14 using content::RecordComputedAction; 14 using content::RecordComputedAction;
15 15
16 static void RecordMenuShow(JNIEnv*, jclass) { 16 static void RecordMenuShow(JNIEnv*, jclass) {
17 RecordAction(UserMetricsAction("MobileMenuShow")); 17 RecordAction(UserMetricsAction("MobileMenuShow"));
18 } 18 }
19 19
20 static void RecordUsingMenu(JNIEnv*, 20 static void RecordUsingMenu(JNIEnv*,
21 jclass, 21 jclass,
22 jboolean is_by_hw_button, 22 jboolean is_by_hw_button,
23 jboolean is_dragging) { 23 jboolean is_dragging) {
24 if (is_by_hw_button) { 24 if (is_by_hw_button) {
25 if (is_dragging) { 25 if (is_dragging) {
26 RecordAction(UserMetricsAction("MobileUsingMenuByHwButtonDragging")); 26 NOTREACHED() << "We do not support dragging for hardware menu button.";
Alexei Svitkine (slow) 2014/08/08 15:20:49 According to the counts dashboard, we have seen sa
Kibeom Kim (inactive) 2014/08/08 18:29:15 I removed HW dragging code recently.
27 } else { 27 } else {
28 RecordAction(UserMetricsAction("MobileUsingMenuByHwButtonTap")); 28 RecordAction(UserMetricsAction("MobileUsingMenuByHwButtonTap"));
29 } 29 }
30 } else { 30 } else {
31 if (is_dragging) { 31 if (is_dragging) {
32 RecordAction(UserMetricsAction("MobileUsingMenuBySwButtonDragging")); 32 RecordAction(UserMetricsAction("MobileUsingMenuBySwButtonDragging"));
33 } else { 33 } else {
34 RecordAction(UserMetricsAction("MobileUsingMenuBySwButtonTap")); 34 RecordAction(UserMetricsAction("MobileUsingMenuBySwButtonTap"));
35 } 35 }
36 } 36 }
37 } 37 }
38 38
39 namespace chrome { 39 namespace chrome {
40 namespace android { 40 namespace android {
41 41
42 // Register native methods 42 // Register native methods
43 bool RegisterUmaBridge(JNIEnv* env) { 43 bool RegisterUmaBridge(JNIEnv* env) {
44 return RegisterNativesImpl(env); 44 return RegisterNativesImpl(env);
45 } 45 }
46 46
47 } // namespace android 47 } // namespace android
48 } // namespace chrome 48 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | tools/metrics/actions/actions.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698