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

Unified Diff: ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc

Issue 2317993004: Move OnURLsDeleted from NTPSnippetsService to ContentSuggestionsService (Closed)
Patch Set: Created 4 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
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
diff --git a/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc b/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
index 151b5d47b195da9564b086f11c4c442d135a09c5..4ce446eff482d7fb29561b07ffa3d8dbb04b39c1 100644
--- a/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
+++ b/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
@@ -117,8 +117,11 @@ IOSChromeContentSuggestionsServiceFactory::BuildServiceInstanceFor(
base::FeatureList::IsEnabled(ntp_snippets::kContentSuggestionsFeature)
? State::ENABLED
: State::DISABLED;
+ HistoryService* history_service =
+ ios::HistoryServiceFactory::GetForBrowserState(
+ chrome_browser_state, ServiceAccessType::EXPLICIT_ACCESS);
std::unique_ptr<ContentSuggestionsService> service =
- base::MakeUnique<ContentSuggestionsService>(state);
+ base::MakeUnique<ContentSuggestionsService>(state, history_service);
if (state == State::DISABLED)
return std::move(service);
@@ -140,9 +143,6 @@ IOSChromeContentSuggestionsServiceFactory::BuildServiceInstanceFor(
OAuth2TokenServiceFactory::GetForBrowserState(chrome_browser_state);
scoped_refptr<net::URLRequestContextGetter> request_context =
browser_state->GetRequestContext();
- HistoryService* history_service =
- ios::HistoryServiceFactory::GetForBrowserState(
- chrome_browser_state, ServiceAccessType::EXPLICIT_ACCESS);
SuggestionsService* suggestions_service =
SuggestionsServiceFactory::GetForBrowserState(chrome_browser_state);
NTPSnippetsScheduler* scheduler = nullptr;
@@ -155,7 +155,7 @@ IOSChromeContentSuggestionsServiceFactory::BuildServiceInstanceFor(
base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
std::unique_ptr<NTPSnippetsService> ntp_snippets_service =
base::MakeUnique<NTPSnippetsService>(
- service.get(), service->category_factory(), prefs, history_service,
+ service.get(), service->category_factory(), prefs,
suggestions_service,
GetApplicationContext()->GetApplicationLocale(), scheduler,
base::MakeUnique<NTPSnippetsFetcher>(
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698