OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | |
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/callback.h" | |
11 | |
12 class GURL; | |
13 | |
14 namespace offline_pages { | |
15 | |
16 struct OfflinePageItem; | |
17 | |
18 // OfflinePageMetadataStore keeps metadata for the offline pages. | |
Dmitry Titov
2015/06/08 21:47:21
Would be nice to add details, for example:
- is it
fgorski
2015/06/09 20:12:17
Done.
I added a comment that nothing like that is
| |
19 class OfflinePageMetadataStore { | |
20 public: | |
21 typedef base::Callback<void(bool, const std::vector<OfflinePageItem>&)> | |
22 LoadCallback; | |
23 typedef base::Callback<void(bool)> UpdateCallback; | |
24 | |
25 OfflinePageMetadataStore(); | |
26 virtual ~OfflinePageMetadataStore(); | |
27 | |
28 // Get all of the offline pages from the store. | |
Dmitry Titov
2015/06/08 21:47:21
Since these methods are async, it's useful to docu
fgorski
2015/06/09 20:12:18
Done.
| |
29 virtual void Load(const LoadCallback& callback) = 0; | |
30 | |
31 // Adds offline page metadata to the store for a given URL. | |
32 // Result of the update is passed in callback. | |
33 virtual void AddOfflinePage(const OfflinePageItem& offline_page, | |
34 const UpdateCallback& callback) = 0; | |
35 | |
36 // Removes offline page metadata from the store. | |
37 // Result of the update is passed in callback. | |
38 virtual void RemoveOfflinePage(const GURL& page_url, | |
39 const UpdateCallback& callback) = 0; | |
40 }; | |
41 | |
42 } // namespace offline_pages | |
43 | |
44 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | |
OLD | NEW |