Chromium Code Reviews| 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 7f76e48525e02ba67ca18849ff966edc27c1c845..ebfab2817618f1a4c5d9fec220493aaea82f6f9d 100644 |
| --- a/ios/chrome/browser/reading_list/reading_list_model.h |
| +++ b/ios/chrome/browser/reading_list/reading_list_model.h |
| @@ -9,6 +9,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/callback.h" |
| #include "base/observer_list.h" |
| #include "ios/chrome/browser/reading_list/reading_list_entry.h" |
| #include "ios/chrome/browser/reading_list/reading_list_model_observer.h" |
| @@ -56,6 +57,13 @@ class ReadingListModel { |
| virtual const ReadingListEntry& GetUnreadEntryAtIndex(size_t index) const = 0; |
| virtual const ReadingListEntry& GetReadEntryAtIndex(size_t index) const = 0; |
| + // Calls the |callback| with entry associated with this |url|. Does nothing if |
| + // there is no entry associated. |
| + // Returns whether the callback has been called. |
| + virtual bool CallbackEntryURL( |
| + const GURL& url, |
| + base::Callback<void(const ReadingListEntry&)> callback) const = 0; |
|
Olivier
2016/09/20 11:13:44
we could add a bool read parameter.
wdyt?
In comm
gambard
2016/09/20 11:27:33
I don't see the use case, can you clarify?
The beh
Olivier
2016/09/20 11:29:50
The bool parameter is in the callback parameter, n
gambard
2016/09/20 12:07:10
For now I don't see where this could be used in ou
|
| + |
| // Adds |url| at the top of the unread entries, and removes entries with the |
| // same |url| from everywhere else if they exist. The addition may be |
| // asynchronous, and the data will be available only once the observers are |