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

Unified Diff: components/offline_pages/offline_page_model.cc

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 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.cc
diff --git a/components/offline_pages/offline_page_model.cc b/components/offline_pages/offline_page_model.cc
index afb51c9a3f0aa222fcef7baa62736ca98aa0ac2b..b36a37c020d00cfa6bc5a092a71e9fa19822b93b 100644
--- a/components/offline_pages/offline_page_model.cc
+++ b/components/offline_pages/offline_page_model.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "components/offline_pages/offline_page_item.h"
+#include "components/offline_pages/offline_page_metadata_store.h"
#include "url/gurl.h"
namespace offline_pages {
@@ -20,6 +21,11 @@ void OfflinePageModel::Shutdown() {
NOTIMPLEMENTED();
}
+void OfflinePageModel::Initialize(scoped_ptr<OfflinePageMetadataStore> store) {
+ DCHECK(store.get());
+ store_ = store.Pass();
Dmitry Titov 2015/06/09 21:58:05 This looks like part of a constructor now. Can it
fgorski 2015/06/09 22:11:13 Done.
+}
+
void OfflinePageModel::SavePageOffline(const GURL& url) {
NOTIMPLEMENTED();
}
@@ -29,4 +35,8 @@ std::vector<OfflinePageItem> OfflinePageModel::GetAllOfflinePages() {
return std::vector<OfflinePageItem>();
}
+OfflinePageMetadataStore* OfflinePageModel::GetStoreForTesting() {
+ return store_.get();
+}
+
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698