Chromium Code Reviews| Index: components/offline_pages/offline_page_model_impl.h |
| diff --git a/components/offline_pages/offline_page_model_impl.h b/components/offline_pages/offline_page_model_impl.h |
| index 28563290eb8a6018e53d9ef00a868fe3f73605f8..15c70de790820d7b973eea924e90c3ec455dca4c 100644 |
| --- a/components/offline_pages/offline_page_model_impl.h |
| +++ b/components/offline_pages/offline_page_model_impl.h |
| @@ -90,8 +90,6 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService { |
| const std::set<GURL>& urls, |
| const CheckPagesExistOfflineCallback& callback) override; |
| void GetAllPages(const MultipleOfflinePageItemCallback& callback) override; |
| - void GetAllPagesWithExpired( |
| - const MultipleOfflinePageItemCallback& callback) override; |
| void GetOfflineIdsForClientId( |
| const ClientId& client_id, |
| const MultipleOfflineIdCallback& callback) override; |
| @@ -102,9 +100,6 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService { |
| const GURL& url, |
| URLSearchMode url_search_mode, |
| const MultipleOfflinePageItemCallback& callback) override; |
| - void ExpirePages(const std::vector<int64_t>& offline_ids, |
| - const base::Time& expiration_time, |
| - const base::Callback<void(bool)>& callback) override; |
| ClientPolicyController* GetPolicyController() override; |
| // Methods for testing only: |
| @@ -198,14 +193,14 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService { |
| // Callbacks for checking metadata consistency. |
| void CheckMetadataConsistencyForArchivePaths( |
| const std::set<base::FilePath>& archive_paths); |
| - // Callback called after headless archives deleted. Orphaned archives are |
| + // Callbacks called after orphaned archives deleted. Orphaned archives are |
|
fgorski
2016/11/22 00:03:00
nit: archives *are* deleted. since you are fixing
romax
2016/11/23 23:32:03
Done.
|
| // archives files on disk which are not pointed to by any of the page items |
| // in metadata store. |
| - void ExpirePagesMissingArchiveFile( |
| + void DeletePagesMissingArchiveFile( |
| const std::set<base::FilePath>& archive_paths); |
| - void OnExpirePagesMissingArchiveFileDone( |
| + void OnDeletePagesMissingArchiveFileDone( |
| const std::vector<int64_t>& offline_ids, |
| - bool success); |
| + DeletePageResult result); |
| void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths); |
| void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives, |
| bool success); |
| @@ -235,16 +230,12 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService { |
| void DoDeleteCachedPagesByURLPredicate(const UrlPredicate& predicate, |
| const DeletePageCallback& callback); |
| - // Callback completing page expiration. |
| - void OnExpirePageDone(const base::Time& expiration_time, |
| - std::unique_ptr<OfflinePagesUpdateResult> result); |
| - |
| - // Clears expired pages if there are any. |
| + // Clears expired pages if there are any or we're running out of storage. |
| void ClearStorageIfNeeded( |
| const OfflinePageStorageManager::ClearStorageCallback& callback); |
| // Callback completing storage clearing. |
| - void OnStorageCleared(size_t expired_page_count, |
| + void OnStorageCleared(size_t cleared_page_count, |
| OfflinePageStorageManager::ClearStorageResult result); |
| // Post task to clear storage. |