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

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

Issue 2434993002: Add methods to Reading List Model (Closed)
Patch Set: Created 4 years, 2 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: 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 40b3551e857969734016763869ee7e7e72f20073..76628c1b0cb869c29666679f141c8882e41de195 100644
--- a/ios/chrome/browser/reading_list/reading_list_model.h
+++ b/ios/chrome/browser/reading_list/reading_list_model.h
@@ -79,6 +79,10 @@ class ReadingListModel {
// the reading list and read, move it to the top of unread if it is not here
// already. This may trigger deletion of old read entries.
virtual void MarkReadByURL(const GURL& url) = 0;
+ // If the |url| is in the reading list and read, mark it unread. If it is in
+ // the reading list and unread, move it to the top of read if it is not here
+ // already.
+ virtual void MarkUnreadByURL(const GURL& url) = 0;
// Methods to mutate an entry. Will locate the relevant entry by URL. Does
// nothing if the entry is not found.
@@ -108,6 +112,9 @@ class ReadingListModel {
DISALLOW_COPY_AND_ASSIGN(ScopedReadingListBatchUpdate);
};
+ // Remove all reading list entries. Used for tests only.
Olivier 2016/10/20 11:25:39 Removes Do you need this in the public interface?
gambard 2016/10/20 11:51:35 Done. I need this for EG test. If you see a better
Olivier 2016/10/20 13:38:02 Unittests use directly ReadingListModelImpl, so yo
gambard 2016/10/20 15:43:05 Done.
+ virtual void ClearModelForTest() = 0;
+
protected:
ReadingListModel();
virtual ~ReadingListModel();

Powered by Google App Engine
This is Rietveld 408576698