| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 const SavePageCallback& callback) = 0; | 88 const SavePageCallback& callback) = 0; |
| 89 | 89 |
| 90 // Marks that the offline page related to the passed |offline_id| has been | 90 // Marks that the offline page related to the passed |offline_id| has been |
| 91 // accessed. Its access info, including last access time and access count, | 91 // accessed. Its access info, including last access time and access count, |
| 92 // will be updated. Requires that the model is loaded. | 92 // will be updated. Requires that the model is loaded. |
| 93 virtual void MarkPageAccessed(int64_t offline_id) = 0; | 93 virtual void MarkPageAccessed(int64_t offline_id) = 0; |
| 94 | 94 |
| 95 // Wipes out all the data by deleting all saved files and clearing the store. | 95 // Wipes out all the data by deleting all saved files and clearing the store. |
| 96 virtual void ClearAll(const base::Closure& callback) = 0; | 96 virtual void ClearAll(const base::Closure& callback) = 0; |
| 97 | 97 |
| 98 // Deletes pages based on |ofline_ids|. | 98 // Deletes pages based on |offline_ids|. |
| 99 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, | 99 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, |
| 100 const DeletePageCallback& callback) = 0; | 100 const DeletePageCallback& callback) = 0; |
| 101 | 101 |
| 102 // Deletes offline pages matching the URL predicate. | 102 // Deletes offline pages matching the URL predicate. |
| 103 virtual void DeletePagesByURLPredicate( | 103 virtual void DeletePagesByURLPredicate( |
| 104 const UrlPredicate& predicate, | 104 const UrlPredicate& predicate, |
| 105 const DeletePageCallback& callback) = 0; | 105 const DeletePageCallback& callback) = 0; |
| 106 | 106 |
| 107 // Returns true via callback if there are offline pages in the given | 107 // Returns true via callback if there are offline pages in the given |
| 108 // |name_space|. | 108 // |name_space|. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Returns the policy controller. | 191 // Returns the policy controller. |
| 192 virtual ClientPolicyController* GetPolicyController() = 0; | 192 virtual ClientPolicyController* GetPolicyController() = 0; |
| 193 | 193 |
| 194 // TODO(dougarnett): Remove this and its uses. | 194 // TODO(dougarnett): Remove this and its uses. |
| 195 virtual bool is_loaded() const = 0; | 195 virtual bool is_loaded() const = 0; |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace offline_pages | 198 } // namespace offline_pages |
| 199 | 199 |
| 200 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ | 200 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
| OLD | NEW |