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

Unified Diff: components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h

Issue 2759943002: [Remote suggestions] Do not fetch before EULA accepted (Closed)
Patch Set: Fix compilation Created 3 years, 9 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: components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
diff --git a/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h b/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
index 00bd44da24cd25cfd7be67e14f15b26027d02c01..780fe8651ed70560930c09ea09ab29d934efc88c 100644
--- a/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
+++ b/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
@@ -18,6 +18,7 @@
#include "components/ntp_snippets/remote/remote_suggestions_provider.h"
#include "components/ntp_snippets/remote/remote_suggestions_scheduler.h"
#include "components/ntp_snippets/remote/request_throttler.h"
+#include "components/web_resource/eula_accepted_notifier.h"
class PrefRegistrySimple;
class PrefService;
@@ -29,6 +30,7 @@ class Clock;
namespace ntp_snippets {
struct Status;
+class EulaState;
class UserClassifier;
// A wrapper around RemoteSuggestionsProvider that introduces periodic fetching.
@@ -64,7 +66,8 @@ class SchedulingRemoteSuggestionsProvider final
std::unique_ptr<RemoteSuggestionsProvider> provider,
PersistentScheduler* persistent_scheduler,
const UserClassifier* user_classifier,
- PrefService* pref_service,
+ PrefService* profile_prefs,
+ PrefService* local_state_prefs,
std::unique_ptr<base::Clock> clock);
~SchedulingRemoteSuggestionsProvider() override;
@@ -198,7 +201,10 @@ class SchedulingRemoteSuggestionsProvider final
RequestThrottler request_throttler_active_ntp_user_;
RequestThrottler request_throttler_active_suggestions_consumer_;
- PrefService* pref_service_;
+ // We should not fetch in background before EULA gets accepted.
+ std::unique_ptr<EulaState> eula_state_;
+
+ PrefService* profile_prefs_;
std::unique_ptr<base::Clock> clock_;
std::set<SchedulingRemoteSuggestionsProvider::TriggerType> enabled_triggers_;
« no previous file with comments | « components/ntp_snippets/DEPS ('k') | components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698