| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ | 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ |
| 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ | 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 bool CallbackEntryURL( | 42 bool CallbackEntryURL( |
| 43 const GURL& url, | 43 const GURL& url, |
| 44 base::Callback<void(const ReadingListEntry&)> callback) const override; | 44 base::Callback<void(const ReadingListEntry&)> callback) const override; |
| 45 | 45 |
| 46 void RemoveEntryByUrl(const GURL& url) override; | 46 void RemoveEntryByUrl(const GURL& url) override; |
| 47 | 47 |
| 48 const ReadingListEntry& AddEntry(const GURL& url, | 48 const ReadingListEntry& AddEntry(const GURL& url, |
| 49 const std::string& title) override; | 49 const std::string& title) override; |
| 50 | 50 |
| 51 void MarkReadByURL(const GURL& url) override; | 51 void MarkReadByURL(const GURL& url) override; |
| 52 void MarkUnreadByURL(const GURL& url) override; |
| 52 | 53 |
| 53 void SetEntryTitle(const GURL& url, const std::string& title) override; | 54 void SetEntryTitle(const GURL& url, const std::string& title) override; |
| 54 void SetEntryDistilledURL(const GURL& url, | 55 void SetEntryDistilledURL(const GURL& url, |
| 55 const GURL& distilled_url) override; | 56 const GURL& distilled_url) override; |
| 56 void SetEntryDistilledState( | 57 void SetEntryDistilledState( |
| 57 const GURL& url, | 58 const GURL& url, |
| 58 ReadingListEntry::DistillationState state) override; | 59 ReadingListEntry::DistillationState state) override; |
| 59 | 60 |
| 60 protected: | 61 protected: |
| 61 void EndBatchUpdates() override; | 62 void EndBatchUpdates() override; |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 typedef std::vector<ReadingListEntry> ReadingListEntries; | 65 typedef std::vector<ReadingListEntry> ReadingListEntries; |
| 65 | 66 |
| 66 ReadingListEntries unread_; | 67 ReadingListEntries unread_; |
| 67 ReadingListEntries read_; | 68 ReadingListEntries read_; |
| 68 std::unique_ptr<ReadingListModelStorage> storageLayer_; | 69 std::unique_ptr<ReadingListModelStorage> storageLayer_; |
| 69 bool hasUnseen_; | 70 bool hasUnseen_; |
| 70 bool loaded_; | 71 bool loaded_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); | 73 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ | 76 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ |
| OLD | NEW |