| 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 COMPONENTS_READING_LIST_READING_LIST_MODEL_IMPL_H_ |
| 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ | 6 #define COMPONENTS_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" |
| 11 #include "ios/chrome/browser/reading_list/reading_list_entry.h" | 11 #include "components/reading_list/reading_list_entry.h" |
| 12 #include "ios/chrome/browser/reading_list/reading_list_model.h" | 12 #include "components/reading_list/reading_list_model.h" |
| 13 #include "ios/chrome/browser/reading_list/reading_list_model_storage.h" | 13 #include "components/reading_list/reading_list_model_storage.h" |
| 14 #include "ios/chrome/browser/reading_list/reading_list_store_delegate.h" | 14 #include "components/reading_list/reading_list_store_delegate.h" |
| 15 | 15 |
| 16 class PrefService; | 16 class PrefService; |
| 17 | 17 |
| 18 // Concrete implementation of a reading list model using in memory lists. | 18 // Concrete implementation of a reading list model using in memory lists. |
| 19 class ReadingListModelImpl : public ReadingListModel, | 19 class ReadingListModelImpl : public ReadingListModel, |
| 20 public ReadingListStoreDelegate, | 20 public ReadingListStoreDelegate, |
| 21 public KeyedService { | 21 public KeyedService { |
| 22 public: | 22 public: |
| 23 // Initialize a ReadingListModelImpl to load and save data in | 23 // Initialize a ReadingListModelImpl to load and save data in |
| 24 // |persistence_layer|. | 24 // |persistence_layer|. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 std::unique_ptr<ReadingListEntries> unread_; | 129 std::unique_ptr<ReadingListEntries> unread_; |
| 130 std::unique_ptr<ReadingListEntries> read_; | 130 std::unique_ptr<ReadingListEntries> read_; |
| 131 std::unique_ptr<ReadingListModelStorage> storage_layer_; | 131 std::unique_ptr<ReadingListModelStorage> storage_layer_; |
| 132 PrefService* pref_service_; | 132 PrefService* pref_service_; |
| 133 bool has_unseen_; | 133 bool has_unseen_; |
| 134 bool loaded_; | 134 bool loaded_; |
| 135 base::WeakPtrFactory<ReadingListModelImpl> weak_ptr_factory_; | 135 base::WeakPtrFactory<ReadingListModelImpl> weak_ptr_factory_; |
| 136 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); | 136 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ | 139 #endif // COMPONENTS_READING_LIST_READING_LIST_MODEL_IMPL_H_ |
| OLD | NEW |