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

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

Issue 2718453002: ntp_snippets: default to staging API on dev/canary (Closed)
Patch Set: Use channel directly 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
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 1b1765a480fcd2d48fb5b3afe34eb062dcff326c..9bdcc237638f8a7723792e07ce15038942fbbac8 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
@@ -53,6 +53,7 @@ using image_fetcher::ImageFetcherImpl;
using ios::BookmarkModelFactory;
using ntp_snippets::BookmarkSuggestionsProvider;
using ntp_snippets::ContentSuggestionsService;
+using ntp_snippets::GetFetchEndpoint;
using ntp_snippets::PersistentScheduler;
using ntp_snippets::RemoteSuggestionsDatabase;
using ntp_snippets::RemoteSuggestionsFetcher;
@@ -157,9 +158,10 @@ IOSChromeContentSuggestionsServiceFactory::BuildServiceInstanceFor(
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(),
+ base::Bind(&ParseJson), GetFetchEndpoint(GetChannel()),
+ GetChannel() == version_info::Channel::STABLE
+ ? google_apis::GetAPIKey()
+ : google_apis::GetNonStableAPIKey(),
service->user_classifier());
auto provider = base::MakeUnique<RemoteSuggestionsProviderImpl>(

Powered by Google App Engine
This is Rietveld 408576698