| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |