OLD | NEW |
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/metrics/uma_bridge.h" | 5 #include "chrome/browser/android/metrics/uma_bridge.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "content/public/browser/user_metrics.h" | 10 #include "content/public/browser/user_metrics.h" |
11 #include "jni/UmaBridge_jni.h" | 11 #include "jni/UmaBridge_jni.h" |
12 | 12 |
13 using base::UserMetricsAction; | 13 using base::UserMetricsAction; |
14 using content::RecordAction; | 14 using content::RecordAction; |
15 using content::RecordComputedAction; | |
16 | 15 |
17 static void RecordMenuShow(JNIEnv*, jclass) { | 16 static void RecordMenuShow(JNIEnv*, jclass) { |
18 RecordAction(UserMetricsAction("MobileMenuShow")); | 17 RecordAction(UserMetricsAction("MobileMenuShow")); |
19 } | 18 } |
20 | 19 |
21 static void RecordUsingMenu(JNIEnv*, | 20 static void RecordUsingMenu(JNIEnv*, |
22 jclass, | 21 jclass, |
23 jboolean is_by_hw_button, | 22 jboolean is_by_hw_button, |
24 jboolean is_dragging) { | 23 jboolean is_dragging) { |
25 if (is_by_hw_button) { | 24 if (is_by_hw_button) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 RecordAction(UserMetricsAction("DataReductionProxy_PromoDisplayed")); | 71 RecordAction(UserMetricsAction("DataReductionProxy_PromoDisplayed")); |
73 } | 72 } |
74 | 73 |
75 static void RecordDataReductionProxySettings( | 74 static void RecordDataReductionProxySettings( |
76 JNIEnv*, jclass, jint notification, jint boundary) { | 75 JNIEnv*, jclass, jint notification, jint boundary) { |
77 UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.SettingsConversion", | 76 UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.SettingsConversion", |
78 notification, | 77 notification, |
79 boundary); | 78 boundary); |
80 } | 79 } |
81 | 80 |
| 81 // First Run Experience |
| 82 static void RecordFreSignInShown(JNIEnv*, jclass) { |
| 83 RecordAction(UserMetricsAction("MobileFre.SignInShown")); |
| 84 } |
| 85 |
82 namespace chrome { | 86 namespace chrome { |
83 namespace android { | 87 namespace android { |
84 | 88 |
85 // Register native methods | 89 // Register native methods |
86 bool RegisterUmaBridge(JNIEnv* env) { | 90 bool RegisterUmaBridge(JNIEnv* env) { |
87 return RegisterNativesImpl(env); | 91 return RegisterNativesImpl(env); |
88 } | 92 } |
89 | 93 |
90 } // namespace android | 94 } // namespace android |
91 } // namespace chrome | 95 } // namespace chrome |
OLD | NEW |