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

Unified Diff: chrome/browser/engagement/site_engagement_service.h

Issue 1373453002: Allow the site engagement service thresholds to be varied via field trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@time-on-site-uma
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/engagement/site_engagement_service.h
diff --git a/chrome/browser/engagement/site_engagement_service.h b/chrome/browser/engagement/site_engagement_service.h
index 0e67b7193bb982ef6326824fa498f8ab7122e5e6..cee44500afd4d5780165787a81c16e0283b90299 100644
--- a/chrome/browser/engagement/site_engagement_service.h
+++ b/chrome/browser/engagement/site_engagement_service.h
@@ -28,24 +28,35 @@ class SiteEngagementScore {
static const char* kPointsAddedTodayKey;
static const char* kLastEngagementTimeKey;
+ // Keys used in the variations params.
+ static const char* kEngagementParams;
+ static const char* kMaxPointsPerDayParam;
+ static const char* kNavigationPointsParam;
+ static const char* kUserInputPointsParam;
+ static const char* kDecayPeriodInDaysParam;
+ static const char* kDecayPointsParam;
benwells 2015/09/29 00:40:31 Do all these keys (and the content settings keys)
dominickn 2015/09/29 00:52:30 @calamity: any thoughts on making all of these pri
calamity 2015/10/01 08:41:19 These are just the keys, not the values? I don't
dominickn 2015/10/01 09:04:22 Done.
+
// The maximum number of points that are allowed.
static const double kMaxPoints;
// The maximum number of points that can be accrued in one day.
- static const double kMaxPointsPerDay;
+ static double gMaxPointsPerDay;
// The number of points given for navigations.
- static const double kNavigationPoints;
+ static double gNavigationPoints;
// The number of points given for user input (indicating time-on-site).
- static const double kUserInputPoints;
+ static double gUserInputPoints;
// Decaying works by removing a portion of the score periodically. This
// constant determines how often that happens.
- static const int kDecayPeriodInDays;
+ static int gDecayPeriodInDays;
// How much the score decays after every kDecayPeriodInDays.
- static const double kDecayPoints;
+ static double gDecayPoints;
calamity 2015/10/01 08:41:19 nit: g_decay_points and above to match majority of
calamity 2015/10/06 03:52:40 Ping? You can do this quickly by running sed -i
dominickn 2015/10/06 05:00:39 Done.
+
+ // Update the default engagement settings via variations.
+ static void UpdateFromVariations();
// The SiteEngagementService does not take ownership of |clock|. It is the
// responsibility of the caller to make sure |clock| outlives this

Powered by Google App Engine
This is Rietveld 408576698