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

Unified Diff: components/ntp_snippets/ntp_snippet.cc

Issue 2167063003: Rename discard to dismiss for NTP snippets and content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bridgeumbiegen
Patch Set: Fix unit test Created 4 years, 5 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
« no previous file with comments | « components/ntp_snippets/ntp_snippet.h ('k') | components/ntp_snippets/ntp_snippets_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippet.cc
diff --git a/components/ntp_snippets/ntp_snippet.cc b/components/ntp_snippets/ntp_snippet.cc
index 101367f51bd2022e241345c1158f250a11238429..6e3e0176e2715e838843308450d32882c474e5cd 100644
--- a/components/ntp_snippets/ntp_snippet.cc
+++ b/components/ntp_snippets/ntp_snippet.cc
@@ -39,7 +39,7 @@ bool GetURLValue(const base::DictionaryValue& dict,
namespace ntp_snippets {
NTPSnippet::NTPSnippet(const std::string& id)
- : id_(id), score_(0), is_discarded_(false), best_source_index_(0) {}
+ : id_(id), score_(0), is_dismissed_(false), best_source_index_(0) {}
NTPSnippet::~NTPSnippet() {}
@@ -184,7 +184,7 @@ std::unique_ptr<NTPSnippet> NTPSnippet::CreateFromProto(
base::Time::FromInternalValue(proto.publish_date()));
snippet->set_expiry_date(base::Time::FromInternalValue(proto.expiry_date()));
snippet->set_score(proto.score());
- snippet->set_discarded(proto.discarded());
+ snippet->set_dismissed(proto.dismissed());
for (int i = 0; i < proto.sources_size(); ++i) {
const SnippetSourceProto& source_proto = proto.sources(i);
@@ -230,7 +230,7 @@ SnippetProto NTPSnippet::ToProto() const {
if (!expiry_date_.is_null())
result.set_expiry_date(expiry_date_.ToInternalValue());
result.set_score(score_);
- result.set_discarded(is_discarded_);
+ result.set_dismissed(is_dismissed_);
for (const SnippetSource& source : sources_) {
SnippetSourceProto* source_proto = result.add_sources();
« no previous file with comments | « components/ntp_snippets/ntp_snippet.h ('k') | components/ntp_snippets/ntp_snippets_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698