| 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 625b19f5f2b503e458bb5f8b9603978f31ea8c02..664ce2e4e934f96ce5882e3826b927dae51b9f5a 100644 | 
| --- a/ios/chrome/browser/reading_list/reading_list_model.h | 
| +++ b/ios/chrome/browser/reading_list/reading_list_model.h | 
| @@ -15,19 +15,28 @@ | 
| #include "ios/chrome/browser/reading_list/reading_list_model_observer.h" | 
|  | 
| class GURL; | 
| +class ReadingListEntry; | 
| class ReadingListModel; | 
| +class ReadingListStore; | 
| + | 
| +using ReadingListEntries = std::vector<ReadingListEntry>; | 
|  | 
| namespace ios { | 
| class ChromeBrowserState; | 
| } | 
|  | 
| +namespace syncer { | 
| +class ModelTypeService; | 
| +} | 
| + | 
| // The reading list model contains two list of entries: one of unread urls, the | 
| // other of read ones. This object should only be accessed from one thread | 
| // (Usually the main thread). The observers callbacks are also sent on the main | 
| // thread. | 
| -class ReadingListModel { | 
| +class ReadingListModel : public base::NonThreadSafe { | 
| public: | 
| class ScopedReadingListBatchUpdate; | 
| + | 
| // Returns true if the model finished loading. Until this returns true the | 
| // reading list is not ready for use. | 
| virtual bool loaded() const = 0; | 
| @@ -35,6 +44,9 @@ class ReadingListModel { | 
| // Returns true if the model is performing batch updates right now. | 
| bool IsPerformingBatchUpdates() const; | 
|  | 
| +  // Returns the ModelTypeService responsible for handling sync message. | 
| +  virtual syncer::ModelTypeService* GetModelTypeService() = 0; | 
| + | 
| // Tells model to prepare for batch updates. | 
| // This method is reentrant, i.e. several batch updates may take place at the | 
| // same time. | 
| @@ -68,6 +80,15 @@ class ReadingListModel { | 
| const GURL& url, | 
| base::Callback<void(const ReadingListEntry&)> callback) const = 0; | 
|  | 
| +  // Synchronously calls the |callback| with entry associated with this |url| | 
| +  // and its |read| status. | 
| +  // Does nothing if there is no entry associated. | 
| +  // Returns whether the callback has been called. | 
| +  virtual bool CallbackEntryReadStatusURL( | 
| +      const GURL& url, | 
| +      base::Callback<void(const ReadingListEntry&, bool read)> callback) | 
| +      const = 0; | 
| + | 
| // 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 | 
| @@ -77,7 +98,7 @@ class ReadingListModel { | 
|  | 
| // Removes an entry. The removal may be asynchronous, and not happen | 
| // immediately. | 
| -  virtual void RemoveEntryByUrl(const GURL& url) = 0; | 
| +  virtual void RemoveEntryByURL(const GURL& url) = 0; | 
|  | 
| // If the |url| is in the reading list and unread, mark it read. If it is in | 
| // the reading list and read, move it to the top of unread if it is not here | 
| @@ -127,6 +148,12 @@ class ReadingListModel { | 
| // ReadingListBatchUpdateToken dtor. | 
| virtual void EndBatchUpdates(); | 
|  | 
| +  // Called when model is entering batch update mode. | 
| +  virtual void EnteringBatchUpdates(); | 
| + | 
| +  // Called when model is leaving batch update mode. | 
| +  virtual void LeavingBatchUpdates(); | 
| + | 
| private: | 
| unsigned int current_batch_updates_count_; | 
|  | 
|  |