| 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 <map> | 10 #include <map> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 // Checks that all of the offline pages have corresponding offline copies. | 212 // Checks that all of the offline pages have corresponding offline copies. |
| 213 // If a page is discovered to be missing an offline copy, its offline page | 213 // If a page is discovered to be missing an offline copy, its offline page |
| 214 // metadata will be removed and |OfflinePageDeleted| will be sent to model | 214 // metadata will be removed and |OfflinePageDeleted| will be sent to model |
| 215 // observers. | 215 // observers. |
| 216 void CheckForExternalFileDeletion(); | 216 void CheckForExternalFileDeletion(); |
| 217 | 217 |
| 218 // Marks pages as expired and removes their respective files from the archive | 218 // Marks pages as expired and removes their respective files from the archive |
| 219 // directory. | 219 // directory. |
| 220 void ExpirePages(const std::vector<int64_t>& offline_ids, | 220 void ExpirePages(const std::vector<int64_t>& offline_ids, |
| 221 const base::Time& expiration_time); | 221 const base::Time& expiration_time, |
| 222 const base::Callback<void(bool)>& callback) override; |
| 222 | 223 |
| 223 // Returns the policy controller. | 224 // Returns the policy controller. |
| 224 ClientPolicyController* GetPolicyController(); | 225 ClientPolicyController* GetPolicyController(); |
| 225 | 226 |
| 226 // Methods for testing only: | 227 // Methods for testing only: |
| 227 OfflinePageMetadataStore* GetStoreForTesting(); | 228 OfflinePageMetadataStore* GetStoreForTesting(); |
| 228 | 229 |
| 229 OfflinePageStorageManager* GetStorageManager(); | 230 OfflinePageStorageManager* GetStorageManager(); |
| 230 | 231 |
| 231 bool is_loaded() const; | 232 bool is_loaded() const; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 std::unique_ptr<ArchiveManager> archive_manager_; | 373 std::unique_ptr<ArchiveManager> archive_manager_; |
| 373 | 374 |
| 374 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_; | 375 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_; |
| 375 | 376 |
| 376 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); | 377 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); |
| 377 }; | 378 }; |
| 378 | 379 |
| 379 } // namespace offline_pages | 380 } // namespace offline_pages |
| 380 | 381 |
| 381 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ | 382 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
| OLD | NEW |