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; |