Index: components/ntp_snippets/remote/request_throttler.h |
diff --git a/components/ntp_snippets/remote/request_throttler.h b/components/ntp_snippets/remote/request_throttler.h |
index 30c2dd557c5f3009bec402459ced79e2d5c49534..76fb1e19c467509acac4759ce69f2000502c7b49 100644 |
--- a/components/ntp_snippets/remote/request_throttler.h |
+++ b/components/ntp_snippets/remote/request_throttler.h |
@@ -40,12 +40,16 @@ class RequestThrottler { |
public: |
// Enumeration listing all current applications of the request counter. |
enum class RequestType { |
- CONTENT_SUGGESTION_FETCHER, |
+ CONTENT_SUGGESTION_FETCHER_RARE_NTP_USER, |
+ CONTENT_SUGGESTION_FETCHER_ACTIVE_NTP_USER, |
+ CONTENT_SUGGESTION_FETCHER_ACTIVE_SUGGESTIONS_CONSUMER, |
CONTENT_SUGGESTION_THUMBNAIL, |
}; |
RequestThrottler(PrefService* pref_service, RequestType type); |
+ void ChangeRequestType(RequestType new_type); |
Marc Treib
2016/10/06 13:41:55
Hm, I find this rather weird. Could we instead jus
jkrcal
2016/10/06 14:45:58
Okay (I would still like them to share the same pr
Marc Treib
2016/10/06 14:54:37
Yup, sharing prefs makes sense.
|
+ |
// Registers profile prefs for all RequestTypes. Called from browser_prefs.cc. |
static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
@@ -77,7 +81,7 @@ class RequestThrottler { |
bool HasDay() const; |
PrefService* pref_service_; |
- const RequestTypeInfo& type_info_; |
+ const RequestTypeInfo* type_info_; |
// The quotas are hardcoded, but can be overridden by variation params. |
int quota_; |