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

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: 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 297c229af93595a5ae2cd1151663085160a3655a..b6b7b6c97ff0035dbf916f84e7bc1f220390942a 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;
@@ -299,7 +300,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);
@@ -310,8 +311,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 ScanForMissingArchivePaths(
+ const std::set<base::FilePath>& archive_paths);
void OnRemoveOfflinePagesMissingArchiveFileDone(
const std::vector<std::pair<int64_t, ClientId>>& offline_client_id_pairs,
DeletePageResult result);
@@ -352,8 +353,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_;
@@ -367,6 +366,10 @@ class OfflinePageModel : public KeyedService,
// automatic page clearing.
std::unique_ptr<OfflinePageStorageManager> storage_manager_;
+ // Manager for the offline archive files and directory, where these files are
jianli 2016/05/17 21:48:13 I think you can skip "directory, where ..." in the
fgorski 2016/05/17 22:50:29 Done.
+ // stored.
+ std::unique_ptr<ArchiveManager> archive_manager_;
+
base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);

Powered by Google App Engine
This is Rietveld 408576698