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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_fetcher.cc

Issue 2570673004: Remove host restrictions from snippets (Closed)
Patch Set: rebase 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: components/ntp_snippets/remote/ntp_snippets_fetcher.cc
diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
index d9cdd322616cd736fc1ec5e8d2c9c81e8e9193ea..b08275fcb166e950c806882b475683966529d189 100644
--- a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
@@ -718,20 +718,10 @@ std::string NTPSnippetsFetcher::RequestBuilder::BuildBody() const {
content_restricts->Append(std::move(entry));
}
- auto content_selectors = base::MakeUnique<base::ListValue>();
- for (const auto& host : params_.hosts) {
- auto entry = base::MakeUnique<base::DictionaryValue>();
- entry->SetString("type", "HOST_RESTRICT");
- entry->SetString("value", host);
- content_selectors->Append(std::move(entry));
- }
-
auto local_scoring_params = base::MakeUnique<base::DictionaryValue>();
local_scoring_params->Set("content_params", std::move(content_params));
local_scoring_params->Set("content_restricts",
std::move(content_restricts));
- local_scoring_params->Set("content_selectors",
- std::move(content_selectors));
auto global_scoring_params = base::MakeUnique<base::DictionaryValue>();
global_scoring_params->SetInteger("num_to_return",
@@ -758,11 +748,6 @@ std::string NTPSnippetsFetcher::RequestBuilder::BuildBody() const {
request->SetString("uiLanguage", user_locale);
}
- auto regular_hosts = base::MakeUnique<base::ListValue>();
- for (const auto& host : params_.hosts) {
- regular_hosts->AppendString(host);
- }
- request->Set("regularlyVisitedHostNames", std::move(regular_hosts));
request->SetString("priority", params_.interactive_request
? "USER_ACTION"
: "BACKGROUND_PREFETCH");
« no previous file with comments | « components/ntp_snippets/remote/ntp_snippets_fetcher.h ('k') | components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698