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

Unified Diff: components/reading_list/core/reading_list_entry.cc

Issue 2811083004: (False positive) Revert of Track if a ReadingListEntry has been dismissed (Closed)
Patch Set: Created 3 years, 8 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/reading_list/core/reading_list_entry.cc
diff --git a/components/reading_list/core/reading_list_entry.cc b/components/reading_list/core/reading_list_entry.cc
index 33d97a299ddea204db01d83f5deedb8c89545fcd..784f76b7375909ef933fae13e6a2c2936e5e79d6 100644
--- a/components/reading_list/core/reading_list_entry.cc
+++ b/components/reading_list/core/reading_list_entry.cc
@@ -68,8 +68,7 @@
0,
0,
0,
- std::move(backoff),
- reading_list::ContentSuggestionsExtra()) {}
+ std::move(backoff)) {}
ReadingListEntry::ReadingListEntry(
const GURL& url,
@@ -85,8 +84,7 @@
int64_t distillation_time,
int64_t distillation_size,
int failed_download_counter,
- std::unique_ptr<net::BackoffEntry> backoff,
- const reading_list::ContentSuggestionsExtra& content_suggestions_extra)
+ std::unique_ptr<net::BackoffEntry> backoff)
: url_(url),
title_(title),
state_(state),
@@ -99,8 +97,7 @@
update_time_us_(update_time),
update_title_time_us_(update_title_time),
distillation_time_us_(distillation_time),
- distillation_size_(distillation_size),
- content_suggestions_extra_(content_suggestions_extra) {
+ distillation_size_(distillation_size) {
if (backoff) {
backoff_ = std::move(backoff);
} else {
@@ -127,8 +124,7 @@
update_time_us_(std::move(entry.update_time_us_)),
update_title_time_us_(std::move(entry.update_title_time_us_)),
distillation_time_us_(std::move(entry.distillation_time_us_)),
- distillation_size_(std::move(entry.distillation_size_)),
- content_suggestions_extra_(std::move(entry.content_suggestions_extra_)) {}
+ distillation_size_(std::move(entry.distillation_size_)) {}
ReadingListEntry::~ReadingListEntry() {}
@@ -183,7 +179,6 @@
update_title_time_us_ = std::move(other.update_title_time_us_);
distillation_time_us_ = std::move(other.distillation_time_us_);
distillation_size_ = std::move(other.distillation_size_);
- content_suggestions_extra_ = std::move(other.content_suggestions_extra_);
return *this;
}
@@ -219,16 +214,6 @@
bool ReadingListEntry::HasBeenSeen() const {
return state_ != UNSEEN;
-}
-
-const reading_list::ContentSuggestionsExtra*
-ReadingListEntry::ContentSuggestionsExtra() const {
- return &content_suggestions_extra_;
-}
-
-void ReadingListEntry::SetContentSuggestionsExtra(
- const reading_list::ContentSuggestionsExtra& extra) {
- content_suggestions_extra_ = extra;
}
void ReadingListEntry::SetDistilledInfo(const base::FilePath& path,
@@ -402,20 +387,11 @@
}
}
- reading_list::ContentSuggestionsExtra content_suggestions_extra;
- if (pb_entry.has_content_suggestions_extra()) {
- const reading_list::ReadingListContentSuggestionsExtra& pb_extra =
- pb_entry.content_suggestions_extra();
- if (pb_extra.has_dismissed()) {
- content_suggestions_extra.dismissed = pb_extra.dismissed();
- }
- }
-
return base::WrapUnique<ReadingListEntry>(new ReadingListEntry(
url, title, state, creation_time_us, first_read_time_us, update_time_us,
update_title_time_us, distillation_state, distilled_path, distilled_url,
distillation_time_us, distillation_size, failed_download_counter,
- std::move(backoff), content_suggestions_extra));
+ std::move(backoff)));
}
// static
@@ -476,8 +452,8 @@
return base::WrapUnique<ReadingListEntry>(new ReadingListEntry(
url, title, state, creation_time_us, first_read_time_us, update_time_us,
- update_title_time_us, WAITING, base::FilePath(), GURL(), 0, 0, 0, nullptr,
- reading_list::ContentSuggestionsExtra()));
+ update_title_time_us, WAITING, base::FilePath(), GURL(), 0, 0, 0,
+ nullptr));
}
void ReadingListEntry::MergeWithEntry(const ReadingListEntry& other) {
@@ -603,11 +579,6 @@
serializer.Serialize(*backoff);
pb_entry->set_backoff(output);
}
-
- reading_list::ReadingListContentSuggestionsExtra* pb_extra =
- pb_entry->mutable_content_suggestions_extra();
- pb_extra->set_dismissed(content_suggestions_extra_.dismissed);
-
return pb_entry;
}
« no previous file with comments | « components/reading_list/core/reading_list_entry.h ('k') | components/reading_list/core/reading_list_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698