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

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

Issue 1986033002: Implement an observer interface for the site engagement service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@site-engagement-refactor
Patch Set: Addressing reviewer comments Created 4 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace base { 16 namespace base {
17 class Clock; 17 class Clock;
18 } 18 }
19 19
20 class HostContentSettingsMap; 20 class HostContentSettingsMap;
21 21
22 class SiteEngagementScore { 22 class SiteEngagementScore {
23 public: 23 public:
24 // The parameters which can be varied via field trial. All "points" values 24 // The parameters which can be varied via field trial.
25 // should be appended to the end of the enum prior to MAX_VARIATION.
26 enum Variation { 25 enum Variation {
27 // The maximum number of points that can be accrued in one day. 26 // The maximum number of points that can be accrued in one day.
28 MAX_POINTS_PER_DAY = 0, 27 MAX_POINTS_PER_DAY = 0,
29 28
30 // The period over which site engagement decays. 29 // The period over which site engagement decays.
31 DECAY_PERIOD_IN_DAYS, 30 DECAY_PERIOD_IN_DAYS,
32 31
33 // The number of points to decay per period. 32 // The number of points to decay per period.
34 DECAY_POINTS, 33 DECAY_POINTS,
35 34
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // The origin this score represents. 185 // The origin this score represents.
187 GURL origin_; 186 GURL origin_;
188 187
189 // The settings map to write this score to when Commit() is called. 188 // The settings map to write this score to when Commit() is called.
190 HostContentSettingsMap* settings_map_; 189 HostContentSettingsMap* settings_map_;
191 190
192 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore); 191 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore);
193 }; 192 };
194 193
195 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 194 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/engagement/site_engagement_observer.cc ('k') | chrome/browser/engagement/site_engagement_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698