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

Unified Diff: components/offline_pages/offline_page_model.h

Issue 1160283003: [Offline] Creates metadata store interface for offline pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@offline-pages-1
Patch Set: Addressing more feedback Created 5 years, 6 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 7e57a14cb60035b1e6bfcc7679b8cbbd32cba053..d32ace14f36ed5216c48131660a1f257f994c2f6 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);
};
« no previous file with comments | « components/offline_pages/offline_page_metadata_store.cc ('k') | components/offline_pages/offline_page_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698