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

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

Issue 2665743002: [Remote suggestions] Clean up variation params in the fetcher. (Closed)
Patch Set: Add a comment 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
Index: components/ntp_snippets/remote/json_request.cc
diff --git a/components/ntp_snippets/remote/json_request.cc b/components/ntp_snippets/remote/json_request.cc
index ec52caa7d58b966d67a3df9948f8707371d68b25..44b59035fc77e61e821bab7aca7fe0f8d5684c0f 100644
--- a/components/ntp_snippets/remote/json_request.cc
+++ b/components/ntp_snippets/remote/json_request.cc
@@ -246,7 +246,6 @@ void JsonRequest::OnJsonError(const std::string& error) {
JsonRequest::Builder::Builder()
: fetch_api_(CHROME_READER_API),
- personalization_(Personalization::kBoth),
language_model_(nullptr) {}
JsonRequest::Builder::Builder(JsonRequest::Builder&&) = default;
JsonRequest::Builder::~Builder() = default;
@@ -300,12 +299,6 @@ JsonRequest::Builder& JsonRequest::Builder::SetParseJsonCallback(
return *this;
}
-JsonRequest::Builder& JsonRequest::Builder::SetPersonalization(
- Personalization personalization) {
- personalization_ = personalization;
- return *this;
-}
-
JsonRequest::Builder& JsonRequest::Builder::SetTickClock(
base::TickClock* tick_clock) {
tick_clock_ = tick_clock;
@@ -353,10 +346,6 @@ std::string JsonRequest::Builder::BuildBody() const {
std::string user_locale = PosixLocaleFromBCP47Language(params_.language_code);
switch (fetch_api_) {
case CHROME_READER_API: {
- auto content_params = base::MakeUnique<base::DictionaryValue>();
- content_params->SetBoolean("only_return_personalized_results",
- ReturnOnlyPersonalizedResults());
-
auto content_restricts = base::MakeUnique<base::ListValue>();
for (const auto* metadata : {"TITLE", "SNIPPET", "THUMBNAIL"}) {
auto entry = base::MakeUnique<base::DictionaryValue>();
@@ -366,7 +355,6 @@ std::string JsonRequest::Builder::BuildBody() const {
}
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));
@@ -429,7 +417,6 @@ std::string JsonRequest::Builder::BuildBody() const {
}
request->Set("topLanguages", std::move(language_list));
- // TODO(sfiera): Support only_return_personalized_results.
// TODO(sfiera): Support count_to_fetch.
break;
}
« no previous file with comments | « components/ntp_snippets/remote/json_request.h ('k') | components/ntp_snippets/remote/json_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698