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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.cc

Issue 2578173002: NTP: Extract JSON requests from Fetcher. (Closed)
Patch Set: Use |GetVariationParamByFeatureAsBool|. Created 4 years 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 | « no previous file | components/ntp_snippets/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/snippets_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
index 4b78785ecf15c08b83b7a2af7511bd98ed9d5584..69b2f96b4f802ec5de487cb969b8ec7c13618db7 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -296,19 +296,10 @@ void SnippetsInternalsMessageHandler::SendAllContent() {
SendLastRemoteSuggestionsBackgroundFetchTime();
if (remote_suggestions_provider_) {
- switch (
- remote_suggestions_provider_->snippets_fetcher()->personalization()) {
- case ntp_snippets::NTPSnippetsFetcher::Personalization::kPersonal:
- SendString("switch-personalized", "Only personalized");
- break;
- case ntp_snippets::NTPSnippetsFetcher::Personalization::kBoth:
- SendString("switch-personalized",
- "Both personalized and non-personalized");
- break;
- case ntp_snippets::NTPSnippetsFetcher::Personalization::kNonPersonal:
- SendString("switch-personalized", "Only non-personalized");
- break;
- }
+ // TODO(fhorschig): Read this string from variations directly.
+ SendString("switch-personalized",
+ remote_suggestions_provider_->snippets_fetcher()
+ ->PersonalizationModeString());
SendString(
"switch-fetch-url",
« no previous file with comments | « no previous file | components/ntp_snippets/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698