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

Unified Diff: components/reading_list/ios/reading_list_entry.h

Issue 2557443003: Add Unseen state to Reading List Entry (Closed)
Patch Set: feedback 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/reading_list/ios/reading_list_entry.h
diff --git a/components/reading_list/ios/reading_list_entry.h b/components/reading_list/ios/reading_list_entry.h
index caa505cb764922e0b991e21c8f22561b7f1f8704..76648032c65f303c13ecf212443e2aa35ef15e1c 100644
--- a/components/reading_list/ios/reading_list_entry.h
+++ b/components/reading_list/ios/reading_list_entry.h
@@ -61,6 +61,8 @@ class ReadingListEntry {
int FailedDownloadCounter() const;
// The read status of the entry.
bool IsRead() const;
+ // Returns if an entry has ever been seen.
+ bool HasBeenSeen() const;
// The last update time of the entry. This value may be used to sort the
// entries. The value is in microseconds since Jan 1st 1970.
@@ -109,13 +111,14 @@ class ReadingListEntry {
void SetDistilledPath(const base::FilePath& path);
// Sets the state to one of PROCESSING, WILL_RETRY or ERROR.
void SetDistilledState(DistillationState distilled_state);
- // Sets the read stat of the entry. Will set the UpdateTime of the entry.
+ // Sets the read state of the entry. Will set the UpdateTime of the entry.
void SetRead(bool read);
private:
+ enum State { UNSEEN, UNREAD, READ };
ReadingListEntry(const GURL& url,
const std::string& title,
- bool read,
+ State state,
int64_t creation_time,
int64_t update_time,
ReadingListEntry::DistillationState distilled_state,
@@ -124,7 +127,7 @@ class ReadingListEntry {
std::unique_ptr<net::BackoffEntry> backoff);
GURL url_;
std::string title_;
- bool read_;
+ State state_;
base::FilePath distilled_path_;
DistillationState distilled_state_;
« no previous file with comments | « components/reading_list/ios/proto/reading_list.proto ('k') | components/reading_list/ios/reading_list_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698