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

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

Issue 2578173002: NTP: Extract JSON requests from Fetcher. (Closed)
Patch Set: No outside accesses to ntp_snippets::internal::* 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
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 c32b36c4355fb5317082bdb2a46a42dcebaacfdd..2bbbec4872789c5bc637a439e88dad7489171dc1 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -301,19 +301,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') | components/ntp_snippets/remote/ntp_snippets_fetcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698