OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
6 #define CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ | 6 #define CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 | 18 |
19 class UserActionRateCounter; | |
20 | |
21 // The native part of java UmaSessionStats class. | 19 // The native part of java UmaSessionStats class. |
22 class UmaSessionStats { | 20 class UmaSessionStats { |
23 public: | 21 public: |
24 UmaSessionStats(); | 22 UmaSessionStats(); |
25 | 23 |
26 void UmaResumeSession(JNIEnv* env, | 24 void UmaResumeSession(JNIEnv* env, |
27 const base::android::JavaParamRef<jobject>& obj); | 25 const base::android::JavaParamRef<jobject>& obj); |
28 void UmaEndSession(JNIEnv* env, | 26 void UmaEndSession(JNIEnv* env, |
29 const base::android::JavaParamRef<jobject>& obj); | 27 const base::android::JavaParamRef<jobject>& obj); |
30 | 28 |
(...skipping 11 matching lines...) Expand all Loading... |
42 base::TimeTicks session_start_time_; | 40 base::TimeTicks session_start_time_; |
43 int active_session_count_; | 41 int active_session_count_; |
44 | 42 |
45 DISALLOW_COPY_AND_ASSIGN(UmaSessionStats); | 43 DISALLOW_COPY_AND_ASSIGN(UmaSessionStats); |
46 }; | 44 }; |
47 | 45 |
48 // Registers the native methods through jni | 46 // Registers the native methods through jni |
49 bool RegisterUmaSessionStats(JNIEnv* env); | 47 bool RegisterUmaSessionStats(JNIEnv* env); |
50 | 48 |
51 #endif // CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ | 49 #endif // CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
OLD | NEW |