| 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 COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ | 5 #ifndef COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ |
| 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ | 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 public: | 29 public: |
| 30 ReadingListStore(StoreFactoryFunction create_store_callback, | 30 ReadingListStore(StoreFactoryFunction create_store_callback, |
| 31 const ChangeProcessorFactory& change_processor_factory); | 31 const ChangeProcessorFactory& change_processor_factory); |
| 32 ~ReadingListStore() override; | 32 ~ReadingListStore() override; |
| 33 | 33 |
| 34 std::unique_ptr<ScopedBatchUpdate> EnsureBatchCreated() override; | 34 std::unique_ptr<ScopedBatchUpdate> EnsureBatchCreated() override; |
| 35 | 35 |
| 36 // ReadingListModelStorage implementation | 36 // ReadingListModelStorage implementation |
| 37 void SetReadingListModel(ReadingListModel* model, | 37 void SetReadingListModel(ReadingListModel* model, |
| 38 ReadingListStoreDelegate* delegate) override; | 38 ReadingListStoreDelegate* delegate, |
| 39 base::Clock* clock) override; |
| 39 | 40 |
| 40 void SaveEntry(const ReadingListEntry& entry) override; | 41 void SaveEntry(const ReadingListEntry& entry) override; |
| 41 void RemoveEntry(const ReadingListEntry& entry) override; | 42 void RemoveEntry(const ReadingListEntry& entry) override; |
| 42 | 43 |
| 43 // Creates an object used to communicate changes in the sync metadata to the | 44 // Creates an object used to communicate changes in the sync metadata to the |
| 44 // model type store. | 45 // model type store. |
| 45 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() | 46 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() |
| 46 override; | 47 override; |
| 47 | 48 |
| 48 // Perform the initial merge between local and sync data. This should only be | 49 // Perform the initial merge between local and sync data. This should only be |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 void AddEntryToBatch(syncer::MutableDataBatch* batch, | 158 void AddEntryToBatch(syncer::MutableDataBatch* batch, |
| 158 const ReadingListEntry& entry); | 159 const ReadingListEntry& entry); |
| 159 | 160 |
| 160 std::unique_ptr<syncer::ModelTypeStore> store_; | 161 std::unique_ptr<syncer::ModelTypeStore> store_; |
| 161 ReadingListModel* model_; | 162 ReadingListModel* model_; |
| 162 ReadingListStoreDelegate* delegate_; | 163 ReadingListStoreDelegate* delegate_; |
| 163 StoreFactoryFunction create_store_callback_; | 164 StoreFactoryFunction create_store_callback_; |
| 164 | 165 |
| 165 int pending_transaction_count_; | 166 int pending_transaction_count_; |
| 166 std::unique_ptr<syncer::ModelTypeStore::WriteBatch> batch_; | 167 std::unique_ptr<syncer::ModelTypeStore::WriteBatch> batch_; |
| 168 |
| 169 base::Clock* clock_; |
| 170 |
| 171 DISALLOW_COPY_AND_ASSIGN(ReadingListStore); |
| 167 }; | 172 }; |
| 168 | 173 |
| 169 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ | 174 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_H_ |
| OLD | NEW |