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

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

Issue 2565213002: Add destructor to ReadingListStoreDelegate (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_STORE_DELEGATE_H_ 5 #ifndef COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_DELEGATE_H_
6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_DELEGATE_H_ 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h"
11
10 class ReadingListEntry; 12 class ReadingListEntry;
11 13
12 // The delegate to handle callbacks from the ReadingListStore. 14 // The delegate to handle callbacks from the ReadingListStore.
13 class ReadingListStoreDelegate { 15 class ReadingListStoreDelegate {
14 public: 16 public:
17 ReadingListStoreDelegate() {}
18 virtual ~ReadingListStoreDelegate() {}
19
15 using ReadingListEntries = std::map<GURL, ReadingListEntry>; 20 using ReadingListEntries = std::map<GURL, ReadingListEntry>;
16 // These three mathods handle callbacks from a ReadingListStore. 21 // These three mathods handle callbacks from a ReadingListStore.
sdefresne 2016/12/11 19:34:51 nit: can you fix typo here "mathods" should be spe
Olivier 2016/12/11 19:39:27 Done.
17 virtual void StoreLoaded(std::unique_ptr<ReadingListEntries> entries) = 0; 22 virtual void StoreLoaded(std::unique_ptr<ReadingListEntries> entries) = 0;
sdefresne 2016/12/11 19:34:51 nit: this method has no comment (the comment above
Olivier 2016/12/11 19:39:27 Done.
18 // Handle sync events. 23 // Handle sync events.
19 // Called to add a new entry to the model. 24 // Called to add a new entry to the model.
20 // |entry| must not already exist in the model. 25 // |entry| must not already exist in the model.
21 virtual void SyncAddEntry(std::unique_ptr<ReadingListEntry> entry) = 0; 26 virtual void SyncAddEntry(std::unique_ptr<ReadingListEntry> entry) = 0;
22 27
23 // Called to merge a sync entry with a local entry in the model. 28 // Called to merge a sync entry with a local entry in the model.
24 // A local entry with the same URL must exist in the local store and have an 29 // A local entry with the same URL must exist in the local store and have an
25 // older UpdateTime. 30 // older UpdateTime.
26 // Return a pointer to the merged entry. 31 // Return a pointer to the merged entry.
27 virtual ReadingListEntry* SyncMergeEntry( 32 virtual ReadingListEntry* SyncMergeEntry(
28 std::unique_ptr<ReadingListEntry> entry) = 0; 33 std::unique_ptr<ReadingListEntry> entry) = 0;
29 34
30 // Called to remove an entry to the model. 35 // Called to remove an entry to the model.
31 virtual void SyncRemoveEntry(const GURL& url) = 0; 36 virtual void SyncRemoveEntry(const GURL& url) = 0;
37 private:
38 DISALLOW_COPY_AND_ASSIGN(ReadingListStoreDelegate);
32 }; 39 };
33 40
34 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_DELEGATE_H_ 41 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_STORE_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698