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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.h

Issue 2292053004: Inject API key directly into snippets fetcher. (Closed)
Patch Set: rebase 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
Index: components/ntp_snippets/ntp_snippets_fetcher.h
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.h b/components/ntp_snippets/ntp_snippets_fetcher.h
index f0800cd5699b5550f56d5533cf03c9fbe18fc545..a5d9ba3df40d5043072da7dd8c65f2c7c46dcd09 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.h
+++ b/components/ntp_snippets/ntp_snippets_fetcher.h
@@ -84,7 +84,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
PrefService* pref_service,
CategoryFactory* category_factory,
const ParseJSONCallback& parse_json_callback,
- bool is_stable_channel);
+ const std::string& api_key);
~NTPSnippetsFetcher() override;
// Set a callback that is called when a new set of snippets are downloaded,
@@ -231,8 +231,8 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// The callback to notify when new snippets get fetched.
SnippetsAvailableCallback snippets_available_callback_;
- // Flag for picking the right (stable/non-stable) API key for Chrome Reader.
- bool is_stable_channel_;
+ // API key to use for non-authenticated requests.
+ const std::string api_key_;
// The variant of the fetching to use, loaded from variation parameters.
Personalization personalization_;
« no previous file with comments | « chrome/browser/ntp_snippets/content_suggestions_service_factory.cc ('k') | components/ntp_snippets/ntp_snippets_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698