| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IMPL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // in metadata store. | 201 // in metadata store. |
| 202 void ExpirePagesMissingArchiveFile( | 202 void ExpirePagesMissingArchiveFile( |
| 203 const std::set<base::FilePath>& archive_paths); | 203 const std::set<base::FilePath>& archive_paths); |
| 204 void OnExpirePagesMissingArchiveFileDone( | 204 void OnExpirePagesMissingArchiveFileDone( |
| 205 const std::vector<int64_t>& offline_ids, | 205 const std::vector<int64_t>& offline_ids, |
| 206 bool success); | 206 bool success); |
| 207 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths); | 207 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths); |
| 208 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives, | 208 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives, |
| 209 bool success); | 209 bool success); |
| 210 | 210 |
| 211 // Callbacks for deleting pages with same URL when saving pages. |
| 212 void OnPagesFoundWithSameURL(const ClientId& client_id, |
| 213 int64_t offline_id, |
| 214 size_t pages_allowed, |
| 215 const MultipleOfflinePageItemResult& items); |
| 216 void OnDeleteOldPagesWithSameURL(DeletePageResult result); |
| 217 |
| 211 // Steps for clearing all. | 218 // Steps for clearing all. |
| 212 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback, | 219 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback, |
| 213 DeletePageResult result); | 220 DeletePageResult result); |
| 214 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success); | 221 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success); |
| 215 void OnReloadStoreDoneForClearAll( | 222 void OnReloadStoreDoneForClearAll( |
| 216 const base::Closure& callback, | 223 const base::Closure& callback, |
| 217 OfflinePageMetadataStore::LoadStatus load_status, | 224 OfflinePageMetadataStore::LoadStatus load_status, |
| 218 const std::vector<OfflinePageItem>& offline_pages); | 225 const std::vector<OfflinePageItem>& offline_pages); |
| 219 | 226 |
| 220 void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages); | 227 void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 std::unique_ptr<ArchiveManager> archive_manager_; | 281 std::unique_ptr<ArchiveManager> archive_manager_; |
| 275 | 282 |
| 276 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; | 283 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; |
| 277 | 284 |
| 278 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); | 285 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); |
| 279 }; | 286 }; |
| 280 | 287 |
| 281 } // namespace offline_pages | 288 } // namespace offline_pages |
| 282 | 289 |
| 283 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 290 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| OLD | NEW |