| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 void RemoveEntryByURL(const GURL& url) override; | 52 void RemoveEntryByURL(const GURL& url) override; |
| 53 | 53 |
| 54 const ReadingListEntry& AddEntry(const GURL& url, | 54 const ReadingListEntry& AddEntry(const GURL& url, |
| 55 const std::string& title) override; | 55 const std::string& title) override; |
| 56 | 56 |
| 57 void MarkReadByURL(const GURL& url) override; | 57 void MarkReadByURL(const GURL& url) override; |
| 58 void MarkUnreadByURL(const GURL& url) override; | 58 void MarkUnreadByURL(const GURL& url) override; |
| 59 | 59 |
| 60 void SetEntryTitle(const GURL& url, const std::string& title) override; | 60 void SetEntryTitle(const GURL& url, const std::string& title) override; |
| 61 void SetEntryDistilledURL(const GURL& url, | 61 void SetEntryDistilledPath(const GURL& url, |
| 62 const GURL& distilled_url) override; | 62 const base::FilePath& distilled_path) override; |
| 63 void SetEntryDistilledState( | 63 void SetEntryDistilledState( |
| 64 const GURL& url, | 64 const GURL& url, |
| 65 ReadingListEntry::DistillationState state) override; | 65 ReadingListEntry::DistillationState state) override; |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 void EndBatchUpdates() override; | 68 void EndBatchUpdates() override; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 void SetPersistentHasUnseen(bool has_unseen); | 71 void SetPersistentHasUnseen(bool has_unseen); |
| 72 bool GetPersistentHasUnseen(); | 72 bool GetPersistentHasUnseen(); |
| 73 | 73 |
| 74 typedef std::vector<ReadingListEntry> ReadingListEntries; | 74 typedef std::vector<ReadingListEntry> ReadingListEntries; |
| 75 | 75 |
| 76 ReadingListEntries unread_; | 76 ReadingListEntries unread_; |
| 77 ReadingListEntries read_; | 77 ReadingListEntries read_; |
| 78 std::unique_ptr<ReadingListModelStorage> storage_layer_; | 78 std::unique_ptr<ReadingListModelStorage> storage_layer_; |
| 79 PrefService* pref_service_; | 79 PrefService* pref_service_; |
| 80 bool has_unseen_; | 80 bool has_unseen_; |
| 81 bool loaded_; | 81 bool loaded_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); | 83 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ | 86 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ |
| OLD | NEW |