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

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

Issue 2671453003: [NTP::Cleanup] Avoid nested complex function calls (Closed)
Patch Set: clean rebase. Created 3 years, 10 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 | « chrome/browser/ntp_snippets/content_suggestions_service_factory.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 5df921a2197792f5777aed78dc80da4643e89c40..2c6a3d1a360a1d039174c0dbba3002a4c474c054 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
@@ -154,16 +154,15 @@ IOSChromeContentSuggestionsServiceFactory::BuildServiceInstanceFor(
->GetSequencedTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::GetSequenceToken(),
base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
+ auto suggestions_fetcher = base::MakeUnique<RemoteSuggestionsFetcher>(
+ signin_manager, token_service, request_context, prefs, nullptr,
+ base::Bind(&ParseJson), GetChannel() == version_info::Channel::STABLE
+ ? google_apis::GetAPIKey()
+ : google_apis::GetNonStableAPIKey(),
+ service->user_classifier());
auto provider = base::MakeUnique<RemoteSuggestionsProviderImpl>(
service.get(), prefs, GetApplicationContext()->GetApplicationLocale(),
- service->category_ranker(),
- base::MakeUnique<RemoteSuggestionsFetcher>(
- signin_manager, token_service, request_context, prefs, nullptr,
- base::Bind(&ParseJson),
- GetChannel() == version_info::Channel::STABLE
- ? google_apis::GetAPIKey()
- : google_apis::GetNonStableAPIKey(),
- service->user_classifier()),
+ service->category_ranker(), std::move(suggestions_fetcher),
base::MakeUnique<ImageFetcherImpl>(request_context.get(),
web::WebThread::GetBlockingPool()),
CreateIOSImageDecoder(task_runner),
« no previous file with comments | « chrome/browser/ntp_snippets/content_suggestions_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698