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_MODEL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // will be updated. Requires that the model is loaded. | 96 // will be updated. Requires that the model is loaded. |
97 virtual void MarkPageAccessed(int64_t offline_id) = 0; | 97 virtual void MarkPageAccessed(int64_t offline_id) = 0; |
98 | 98 |
99 // Wipes out all the data by deleting all saved files and clearing the store. | 99 // Wipes out all the data by deleting all saved files and clearing the store. |
100 virtual void ClearAll(const base::Closure& callback) = 0; | 100 virtual void ClearAll(const base::Closure& callback) = 0; |
101 | 101 |
102 // Deletes pages based on |offline_ids|. | 102 // Deletes pages based on |offline_ids|. |
103 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, | 103 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, |
104 const DeletePageCallback& callback) = 0; | 104 const DeletePageCallback& callback) = 0; |
105 | 105 |
106 // Deletes offline pages matching the URL predicate. | 106 // Deletes cached offline pages matching the URL predicate. |
107 virtual void DeletePagesByURLPredicate( | 107 virtual void DeleteCachedPagesByURLPredicate( |
108 const UrlPredicate& predicate, | 108 const UrlPredicate& predicate, |
109 const DeletePageCallback& callback) = 0; | 109 const DeletePageCallback& callback) = 0; |
110 | 110 |
111 // Returns true via callback if there are offline pages in the given | 111 // Returns true via callback if there are offline pages in the given |
112 // |name_space|. | 112 // |name_space|. |
113 virtual void HasPages(const std::string& name_space, | 113 virtual void HasPages(const std::string& name_space, |
114 const HasPagesCallback& callback) = 0; | 114 const HasPagesCallback& callback) = 0; |
115 | 115 |
116 // Returns via callback all GURLs in |urls| that are equal to the online URL | 116 // Returns via callback all GURLs in |urls| that are equal to the online URL |
117 // of any offline page. | 117 // of any offline page. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // TODO(dougarnett): Remove this and its uses. | 192 // TODO(dougarnett): Remove this and its uses. |
193 virtual bool is_loaded() const = 0; | 193 virtual bool is_loaded() const = 0; |
194 | 194 |
195 // Returns the logger. Ownership is retained by the model. | 195 // Returns the logger. Ownership is retained by the model. |
196 virtual OfflineEventLogger* GetLogger() = 0; | 196 virtual OfflineEventLogger* GetLogger() = 0; |
197 }; | 197 }; |
198 | 198 |
199 } // namespace offline_pages | 199 } // namespace offline_pages |
200 | 200 |
201 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ | 201 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
OLD | NEW |