Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: components/offline_pages/offline_page_model.h

Issue 1981093002: [Offline pages] Hooking up Archive Manager to Offline Page Model (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@archive-manager
Patch Set: Fixing the windows bot Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/offline_page_model.h
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h
index 925cff5e1db88442bc71febdcf19768a122ab869..b7575a88d269824d486d772e83fd8a04217b177d 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -42,9 +42,10 @@ static const char* const kBookmarkNamespace = "bookmark";
static const int64_t kInvalidOfflineId = 0;
struct ClientId;
+struct OfflinePageItem;
+class ArchiveManager;
class ClientPolicyController;
-struct OfflinePageItem;
class OfflinePageMetadataStore;
class OfflinePageStorageManager;
@@ -300,7 +301,7 @@ class OfflinePageModel : public KeyedService,
// Steps for deleting files and data for an offline page.
void OnDeleteArchiveFilesDone(const std::vector<int64_t>& offline_ids,
const DeletePageCallback& callback,
- const bool* success);
+ bool success);
void OnRemoveOfflinePagesDone(const std::vector<int64_t>& offline_ids,
const DeletePageCallback& callback,
bool success);
@@ -311,8 +312,8 @@ class OfflinePageModel : public KeyedService,
bool success);
// Callbacks for checking if offline pages are missing archive files.
- void OnFindPagesMissingArchiveFile(
- const std::vector<int64_t>* ids_of_pages_missing_archive_file);
+ void ScanForMissingArchiveFiles(
+ const std::set<base::FilePath>& archive_paths);
void OnRemoveOfflinePagesMissingArchiveFileDone(
const std::vector<std::pair<int64_t, ClientId>>& offline_client_id_pairs,
DeletePageResult result);
@@ -353,8 +354,6 @@ class OfflinePageModel : public KeyedService,
// In memory copy of the offline page metadata, keyed by bookmark IDs.
std::map<int64_t, OfflinePageItem> offline_pages_;
- scoped_refptr<base::SequencedTaskRunner> task_runner_;
-
// Pending archivers owned by this model.
PendingArchivers pending_archivers_;
@@ -368,6 +367,9 @@ class OfflinePageModel : public KeyedService,
// automatic page clearing.
std::unique_ptr<OfflinePageStorageManager> storage_manager_;
+ // Manager for the offline archive files and directory.
+ std::unique_ptr<ArchiveManager> archive_manager_;
+
base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);
« no previous file with comments | « components/offline_pages/archive_manager_unittest.cc ('k') | components/offline_pages/offline_page_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698