diff options
author | fgorski <fgorski@chromium.org> | 2015-06-10 00:45:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-10 07:45:46 +0000 |
commit | 2475986c9476407f0cec00d2eb660b480db30aae (patch) | |
tree | 57c2e3ed3eb08b44302eafa6952142196bef3ee6 /components/offline_pages/offline_page_model.h | |
parent | 4d0ac15c70965c05e6905e5bf144cd8decf768c7 (diff) | |
download | chromium_src-2475986c9476407f0cec00d2eb660b480db30aae.zip chromium_src-2475986c9476407f0cec00d2eb660b480db30aae.tar.gz chromium_src-2475986c9476407f0cec00d2eb660b480db30aae.tar.bz2 |
[Offline] Creates metadata store interface for offline pages
Offline pages metadata store:
* Creates interface for the store
* The following actions are available on the store:
- AddOfflinePage,
- RemoveOfflinePage,
- Load,
* Updates to the components_unittests to include offline
pages
BUG=491352
Review URL: https://codereview.chromium.org/1160283003
Cr-Commit-Position: refs/heads/master@{#333697}
Diffstat (limited to 'components/offline_pages/offline_page_model.h')
-rw-r--r-- | components/offline_pages/offline_page_model.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h index 7e57a14..d32ace1 100644 --- a/components/offline_pages/offline_page_model.h +++ b/components/offline_pages/offline_page_model.h @@ -8,6 +8,7 @@ #include <vector> #include "base/macros.h" +#include "base/memory/scoped_ptr.h" #include "components/keyed_service/core/keyed_service.h" class GURL; @@ -15,12 +16,13 @@ class GURL; namespace offline_pages { struct OfflinePageItem; +class OfflinePageMetadataStore; // Serivce for saving pages offline, storing the offline copy and metadata, and // retrieving them upon request. class OfflinePageModel : public KeyedService { public: - OfflinePageModel(); + explicit OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store); ~OfflinePageModel() override; // KeyedService: @@ -32,7 +34,13 @@ class OfflinePageModel : public KeyedService { // Gets a set of all offline pages metadata. std::vector<OfflinePageItem> GetAllOfflinePages(); + // Methods for testing only: + OfflinePageMetadataStore* GetStoreForTesting(); + private: + // Persistent store for offline page metadata. + scoped_ptr<OfflinePageMetadataStore> store_; + DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); }; |