Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: components/reading_list/ios/reading_list_model_storage.h

Issue 2525663002: Refactor Reading List Model to use URL as key. (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/reading_list/ios/reading_list_model_observer.h ('k') | components/reading_list/ios/reading_list_model_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698