| 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_MODEL_STORAGE_H_ | 5 #ifndef COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_STORAGE_H_ |
| 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_STORAGE_H_ | 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_STORAGE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "components/reading_list/ios/reading_list_entry.h" | 10 #include "components/reading_list/ios/reading_list_entry.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // transaction is commited. | 34 // transaction is commited. |
| 35 // Multiple transaction can be started at the same time. Commit will happen | 35 // Multiple transaction can be started at the same time. Commit will happen |
| 36 // when the last transaction is commited. | 36 // when the last transaction is commited. |
| 37 // Returns a scoped batch update object that should be retained while the | 37 // Returns a scoped batch update object that should be retained while the |
| 38 // batch update is performed. Deallocating this object will inform model that | 38 // batch update is performed. Deallocating this object will inform model that |
| 39 // the batch update has completed. | 39 // the batch update has completed. |
| 40 virtual std::unique_ptr<ScopedBatchUpdate> EnsureBatchCreated() = 0; | 40 virtual std::unique_ptr<ScopedBatchUpdate> EnsureBatchCreated() = 0; |
| 41 | 41 |
| 42 // Saves or updates an entry. If the entry is not yet in the database, it is | 42 // Saves or updates an entry. If the entry is not yet in the database, it is |
| 43 // created. | 43 // created. |
| 44 virtual void SaveEntry(const ReadingListEntry& entry, bool read) = 0; | 44 virtual void SaveEntry(const ReadingListEntry& entry) = 0; |
| 45 | 45 |
| 46 // Removed an entry from the storage. | 46 // Removed an entry from the storage. |
| 47 virtual void RemoveEntry(const ReadingListEntry& entry) = 0; | 47 virtual void RemoveEntry(const ReadingListEntry& entry) = 0; |
| 48 | 48 |
| 49 class ScopedBatchUpdate { | 49 class ScopedBatchUpdate { |
| 50 public: | 50 public: |
| 51 virtual ~ScopedBatchUpdate() {} | 51 virtual ~ScopedBatchUpdate() {} |
| 52 }; | 52 }; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_STORAGE_H_ | 55 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_STORAGE_H_ |
| OLD | NEW |