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

Unified Diff: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc

Issue 2519053002: 📰 Let the backend trigger sign in related refreshes (Closed)
Patch Set: Fix iOS build Created 4 years, 1 month 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/ntp_snippets/content_suggestions_service_factory.cc
diff --git a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
index d81f0295acba7e789dcbcabf1ad95422aa2871c2..f30de06f5d4d7676e404a0ef7b08781039d6db7e 100644
--- a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
+++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
@@ -240,11 +240,13 @@ KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor(
base::FeatureList::IsEnabled(ntp_snippets::kContentSuggestionsFeature)
? State::ENABLED
: State::DISABLED;
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
HistoryService* history_service = HistoryServiceFactory::GetForProfile(
profile, ServiceAccessType::EXPLICIT_ACCESS);
PrefService* pref_service = profile->GetPrefs();
- ContentSuggestionsService* service =
- new ContentSuggestionsService(state, history_service, pref_service);
+ ContentSuggestionsService* service = new ContentSuggestionsService(
+ state, signin_manager, history_service, pref_service);
if (state == State::DISABLED) {
// Since we won't initialise the services, they won't get a chance to
// unschedule their tasks. We do it explicitly here instead.
@@ -261,8 +263,6 @@ KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor(
#endif // OS_ANDROID
BookmarkModel* bookmark_model =
BookmarkModelFactory::GetForBrowserContext(profile);
- SigninManagerBase* signin_manager =
- SigninManagerFactory::GetForProfile(profile);
OAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
SyncService* sync_service =
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | chrome/browser/ui/webui/snippets_internals_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698