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

Side by Side Diff: chrome/browser/android/uma_session_stats.h

Issue 962293002: Upstream UmaSessionStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
(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_UMA_SESSION_STATS_H_
6 #define CHROME_BROWSER_ANDROID_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_UMA_SESSION_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698