OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "components/offline_pages/offline_page_item.h" | 13 #include "components/offline_pages/offline_page_item.h" |
14 #include "components/offline_pages/offline_store_types.h" | 14 #include "components/offline_pages/offline_store_types.h" |
15 | 15 |
16 class GURL; | |
17 | |
18 namespace offline_pages { | 16 namespace offline_pages { |
19 | 17 |
20 typedef StoreUpdateResult<OfflinePageItem> OfflinePagesUpdateResult; | 18 typedef StoreUpdateResult<OfflinePageItem> OfflinePagesUpdateResult; |
21 | 19 |
22 // OfflinePageMetadataStore keeps metadata for the offline pages. | 20 // OfflinePageMetadataStore keeps metadata for the offline pages. |
23 // Ability to create multiple instances of the store as well as behavior of | 21 // Ability to create multiple instances of the store as well as behavior of |
24 // asynchronous operations when the object is being destroyed, before such | 22 // asynchronous operations when the object is being destroyed, before such |
25 // operation finishes will depend on implementation. It should be possible to | 23 // operation finishes will depend on implementation. It should be possible to |
26 // issue multiple asynchronous operations in parallel. | 24 // issue multiple asynchronous operations in parallel. |
27 class OfflinePageMetadataStore { | 25 class OfflinePageMetadataStore { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Resets the store. | 69 // Resets the store. |
72 virtual void Reset(const ResetCallback& callback) = 0; | 70 virtual void Reset(const ResetCallback& callback) = 0; |
73 | 71 |
74 // Gets the store state. | 72 // Gets the store state. |
75 virtual StoreState state() const = 0; | 73 virtual StoreState state() const = 0; |
76 }; | 74 }; |
77 | 75 |
78 } // namespace offline_pages | 76 } // namespace offline_pages |
79 | 77 |
80 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ | 78 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ |
OLD | NEW |