| 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 35084369844be9396d41cad400524cf3211a8bb8..4c1a75b30adce9bb57fc709f0c1c642744151de9 100644
|
| --- a/components/offline_pages/offline_page_model.h
|
| +++ b/components/offline_pages/offline_page_model.h
|
| @@ -23,6 +23,7 @@
|
| #include "base/supports_user_data.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "components/offline_pages/offline_page_archiver.h"
|
| +#include "components/offline_pages/offline_page_client_policy.h"
|
| #include "components/offline_pages/offline_page_metadata_store.h"
|
|
|
| class GURL;
|
| @@ -132,6 +133,8 @@ class OfflinePageModel : public KeyedService, public base::SupportsUserData {
|
| typedef base::Callback<void(const CheckPagesExistOfflineResult&)>
|
| CheckPagesExistOfflineCallback;
|
| typedef base::Callback<void(bool)> HasPagesCallback;
|
| + typedef std::map<LifetimePolicy::LifetimeType,
|
| + const base::FilePath&> ArchiveDirs;
|
|
|
| // Generates a new offline id
|
| static int64_t GenerateOfflineId();
|
| @@ -143,7 +146,7 @@ class OfflinePageModel : public KeyedService, public base::SupportsUserData {
|
|
|
| // All blocking calls/disk access will happen on the provided |task_runner|.
|
| OfflinePageModel(std::unique_ptr<OfflinePageMetadataStore> store,
|
| - const base::FilePath& archives_dir,
|
| + const ArchiveDirs& archive_dirs,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner);
|
| ~OfflinePageModel() override;
|
|
|
| @@ -319,13 +322,16 @@ class OfflinePageModel : public KeyedService, public base::SupportsUserData {
|
| const base::Callback<bool(const GURL&)>& predicate,
|
| const DeletePageCallback& callback);
|
|
|
| + // Get the archive directory for the client id.
|
| + const base::FilePath& GetArchivePath(const ClientId& client_id);
|
| +
|
| void RunWhenLoaded(const base::Closure& job);
|
|
|
| // Persistent store for offline page metadata.
|
| std::unique_ptr<OfflinePageMetadataStore> store_;
|
|
|
| - // Location where all of the archive files will be stored.
|
| - base::FilePath archives_dir_;
|
| + // Location where all of the archive files will be stored based on namespace.
|
| + ArchiveDirs archive_dirs_;
|
|
|
| // The observers.
|
| base::ObserverList<Observer> observers_;
|
|
|