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

Unified Diff: ios/chrome/browser/reading_list/reading_list_model.h

Issue 2362063004: Find reading list entry state in model from url (Closed)
Patch Set: update comment Created 4 years, 3 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 | « no previous file | ios/chrome/browser/reading_list/reading_list_model_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/reading_list/reading_list_model.h
diff --git a/ios/chrome/browser/reading_list/reading_list_model.h b/ios/chrome/browser/reading_list/reading_list_model.h
index 9dc2d38240121d75af757cbab94eedcd46297039..5806d7286c27395f3f4c7fb06759bfc4c2d09267 100644
--- a/ios/chrome/browser/reading_list/reading_list_model.h
+++ b/ios/chrome/browser/reading_list/reading_list_model.h
@@ -28,6 +28,11 @@ class ChromeBrowserState;
class ReadingListModel {
public:
class ScopedReadingListBatchUpdate;
+
+ // The entry is either NOTPRESENT in the model, in the READ part or in the
+ // UNREAD part of the model.
+ enum EntryState { NOTPRESENT, READ, UNREAD };
Olivier 2016/09/23 14:54:54 NOT_PRESENT?
gambard 2016/09/26 14:02:30 Done.
+
// Returns true if the model finished loading. Until this returns true the
// reading list is not ready for use.
virtual bool loaded() const = 0;
@@ -80,6 +85,9 @@ class ReadingListModel {
// already. This may trigger deletion of old read entries.
virtual void MarkReadByURL(const GURL& url) = 0;
+ // Return the state of the entry in the model (not present, read or unread).
+ virtual EntryState EntryPositionByURL(const GURL& url) = 0;
Olivier 2016/09/23 14:54:54 position is more an index IMO.
gambard 2016/09/26 14:02:30 Done.
+
// Methods to mutate an entry. Will locate the relevant entry by URL. Does
// nothing if the entry is not found.
virtual void SetEntryTitle(const GURL& url, const std::string& title) = 0;
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698