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.
5 #ifndef CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_
6 #define CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_
11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h"
14 class UserActionRateCounter
;
16 // The native part of java UmaSessionStats class.
17 class UmaSessionStats
{
21 void UmaResumeSession(JNIEnv
* env
, jobject obj
);
22 void UmaEndSession(JNIEnv
* env
, jobject obj
);
24 static void RegisterSyntheticFieldTrialWithNameHash(
25 uint32_t trial_name_hash
,
26 const std::string
& group_name
);
28 static void RegisterSyntheticFieldTrial(
29 const std::string
& trial_name
,
30 const std::string
& group_name
);
35 // Start of the current session, used for UMA.
36 base::TimeTicks session_start_time_
;
37 int active_session_count_
;
39 DISALLOW_COPY_AND_ASSIGN(UmaSessionStats
);
42 // Registers the native methods through jni
43 bool RegisterUmaSessionStats(JNIEnv
* env
);
45 #endif // CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_