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

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

Issue 2718453002: ntp_snippets: default to staging API on dev/canary (Closed)
Patch Set: 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 | « components/ntp_snippets/DEPS ('k') | components/ntp_snippets/remote/remote_suggestions_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/remote/remote_suggestions_fetcher.h
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher.h b/components/ntp_snippets/remote/remote_suggestions_fetcher.h
index e7e9827eb0891571e7ad6b5f56bdd10c2e6d1a4f..c2c929722edcba05de02faeb83bccfdda76a07f1 100644
--- a/components/ntp_snippets/remote/remote_suggestions_fetcher.h
+++ b/components/ntp_snippets/remote/remote_suggestions_fetcher.h
@@ -22,6 +22,7 @@
#include "components/ntp_snippets/remote/request_params.h"
#include "components/ntp_snippets/status.h"
#include "components/translate/core/browser/language_model.h"
+#include "components/version_info/version_info.h"
#include "net/url_request/url_request_context_getter.h"
class PrefService;
@@ -35,6 +36,10 @@ namespace ntp_snippets {
class UserClassifier;
+// Returns the appropriate API endpoint for the fetcher, in consideration of
+// the channel and variation parameters.
+GURL GetFetchEndpoint(version_info::Channel channel);
+
// TODO(tschumann): BuildArticleCategoryInfo() and BuildRemoteCategoryInfo()
// don't really belong into this library. However, as the fetcher is
// providing this data for server-defined remote sections it's a good starting
@@ -82,6 +87,7 @@ class RemoteSuggestionsFetcher : public OAuth2TokenService::Consumer,
PrefService* pref_service,
translate::LanguageModel* language_model,
const ParseJSONCallback& parse_json_callback,
+ const GURL& api_endpoint,
const std::string& api_key,
const UserClassifier* user_classifier);
~RemoteSuggestionsFetcher() override;
« no previous file with comments | « components/ntp_snippets/DEPS ('k') | components/ntp_snippets/remote/remote_suggestions_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698