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

Side by Side Diff: chrome/browser/metrics/android_metrics_provider_android.h

Issue 294043008: Introduce AndroidMetricsProvider class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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_METRICS_ANDROID_METRICS_PROVIDER_ANDROID_H_
6 #define CHROME_BROWSER_METRICS_ANDROID_METRICS_PROVIDER_ANDROID_H_
7
8 #include "base/basictypes.h"
9 #include "chrome/browser/android/activity_type_ids.h"
10 #include "components/metrics/metrics_provider.h"
11
12 class PrefService;
13
14 // AndroidMetricsProvider provides Android-specific stability metrics.
15 class AndroidMetricsProvider : public metrics::MetricsProvider {
16 public:
17 // Creates the AndroidMetricsProvider with the given |local_state|.
18 explicit AndroidMetricsProvider(PrefService* local_state);
19 virtual ~AndroidMetricsProvider();
20
21 // Called when the Activity that the user interacts with is swapped out.
22 void OnForegroundActivityChanged(ActivityTypeIds::Type type);
23
24 // metrics::MetricsDataProvider:
25 virtual void ProvideStabilityMetrics(
26 metrics::SystemProfileProto_Stability* stability_proto) OVERRIDE;
27
28 // Registers local state prefs used by this class.
29 static void RegisterPrefs(PrefRegistrySimple* registry);
30
31 private:
32 // Called to log launch and crash stats to preferences.
33 void LogAndroidStabilityToPrefs();
34
35 // Converts crash stats stored in the preferences into histograms.
36 void ConvertAndroidStabilityPrefsToHistograms();
Ilya Sherman 2014/05/21 09:15:28 nit: WDYT of dropping "Android" from these method
Alexei Svitkine (slow) 2014/05/21 09:48:47 SGTM. Done.
37
38 // Weak pointer to the local state prefs store.
39 PrefService* local_state_;
40
41 DISALLOW_COPY_AND_ASSIGN(AndroidMetricsProvider);
42 };
43
44 #endif // CHROME_BROWSER_METRICS_ANDROID_METRICS_PROVIDER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698