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

Side by Side Diff: chrome/browser/engagement/site_engagement_metrics.h

Issue 1368533004: Add UMA metrics to the site engagement service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@time-on-site
Patch Set: Addressing reviewer comments Created 5 years, 2 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_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);
26
27 static void RecordEngagementByOrigin(std::map<GURL, double> score_map);
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 };
36
37 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698