OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
| 6 #define CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
| 7 |
| 8 #include <jni.h> |
| 9 #include <string> |
| 10 |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/time/time.h" |
| 13 |
| 14 class UserActionRateCounter; |
| 15 |
| 16 // The native part of java UmaSessionStats class. |
| 17 class UmaSessionStats { |
| 18 public: |
| 19 UmaSessionStats(); |
| 20 |
| 21 void UmaResumeSession(JNIEnv* env, jobject obj); |
| 22 void UmaEndSession(JNIEnv* env, jobject obj); |
| 23 |
| 24 static void RegisterSyntheticFieldTrialWithNameHash( |
| 25 uint32_t trial_name_hash, |
| 26 const std::string& group_name); |
| 27 |
| 28 static void RegisterSyntheticFieldTrial( |
| 29 const std::string& trial_name, |
| 30 const std::string& group_name); |
| 31 |
| 32 private: |
| 33 ~UmaSessionStats(); |
| 34 |
| 35 // Start of the current session, used for UMA. |
| 36 base::TimeTicks session_start_time_; |
| 37 int active_session_count_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(UmaSessionStats); |
| 40 }; |
| 41 |
| 42 // Registers the native methods through jni |
| 43 bool RegisterUmaSessionStats(JNIEnv* env); |
| 44 |
| 45 #endif // CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_ |
OLD | NEW |