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

Unified Diff: components/offline_pages/core/offline_page_model_impl.h

Issue 2889663004: [DO NOT COMMIT][Offline Pages] Moving Offline Page Cache to cache directory.
Patch Set: again? Created 3 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/core/offline_page_model_impl.h
diff --git a/components/offline_pages/core/offline_page_model_impl.h b/components/offline_pages/core/offline_page_model_impl.h
index 64e2e3cfdfd69a91cea957a29933a927f1efd7a7..499a3007961466302af87638aea212c335187ccd 100644
--- a/components/offline_pages/core/offline_page_model_impl.h
+++ b/components/offline_pages/core/offline_page_model_impl.h
@@ -57,7 +57,7 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// All blocking calls/disk access will happen on the provided |task_runner|.
OfflinePageModelImpl(
std::unique_ptr<OfflinePageMetadataStore> store,
- const base::FilePath& archives_dir,
+ const ArchiveDirectories& archive_dirs,
const scoped_refptr<base::SequencedTaskRunner>& task_runner);
~OfflinePageModelImpl() override;
@@ -245,6 +245,10 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Check if |offline_page| should be removed on cache reset by user.
bool IsRemovedOnCacheReset(const OfflinePageItem& offline_page) const;
+ // Get the archive directory based on namespace.
+ const base::FilePath& GetArchiveDirectory(
+ const std::string& name_space) const;
+
void RunWhenLoaded(const base::Closure& job);
base::Time GetCurrentTime() const;
@@ -253,7 +257,7 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
std::unique_ptr<OfflinePageMetadataStore> store_;
// Location where all of the archive files will be stored.
- base::FilePath archives_dir_;
+ ArchiveDirectories archive_dirs_;
// The observers.
base::ObserverList<Observer> observers_;
« no previous file with comments | « components/offline_pages/core/archive_manager_unittest.cc ('k') | components/offline_pages/core/offline_page_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698