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_ENGAGEMENT_SITE_ENGAGEMENT_METRICS_H_ | |
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_METRICS_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "url/gurl.h" | |
11 | |
12 // Helper class managing the UMA histograms for the Site Engagement Service. | |
13 class SiteEngagementMetrics { | |
14 public: | |
15 // This is used to back a UMA histogram, so it should be treated as | |
16 // append-only. | |
17 enum EngagementType { | |
18 ENGAGEMENT_NAVIGATION, | |
19 ENGAGEMENT_KEYPRESS, | |
20 ENGAGEMENT_MOUSE, | |
21 }; | |
22 | |
23 static void RecordTotalSiteEngagement(double total_engagement); | |
24 | |
25 static void RecordTotalOriginsEngaged(int total_origins); | |
benwells
2015/09/30 00:10:54
Nit: I don' think you need a blank line between ev
dominickn
2015/10/01 01:12:02
Done.
| |
26 | |
27 static void RecordEngagementScore(std::map<GURL, double> score_map); | |
benwells
2015/09/30 00:10:54
Nit: this should be RecordEngagementScores (i.e. w
dominickn
2015/10/01 01:12:02
Done.
| |
28 | |
29 static void RecordOriginsWithMaxEngagement(int total_origins); | |
30 | |
31 static void RecordOriginsWithMaxDailyEngagement(int total_origins); | |
32 | |
33 static void RecordEngagement(EngagementType type); | |
34 | |
35 static const char kTotalEngagementHistogram[]; | |
benwells
2015/09/30 00:10:54
Nit: normally you'd put these first (and that woul
dominickn
2015/10/01 01:12:02
Done.
| |
36 static const char kTotalOriginsHistogram[]; | |
37 static const char kEngagementScoreHistogram[]; | |
38 static const char kOriginsWithMaxEngagementHistogram[]; | |
39 static const char kOriginsWithMaxDailyEngagementHistogram[]; | |
40 static const char kEngagementTypeHistogram[]; | |
41 | |
benwells
2015/09/30 00:10:54
Nit: no blank line.
dominickn
2015/10/01 01:12:02
Done.
| |
42 }; | |
43 | |
44 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_METRICS_H_ | |
OLD | NEW |