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

Unified Diff: components/offline_pages/offline_page_model.cc

Issue 1174803002: [Offline] Adding archiver interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@offline-pages-store
Patch Set: 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 5fd54d0606ddc06c1a6dcddd0a7f0a642d91b040..65702d1d0694b370ddcfa6b29a3ab522973b3174 100644
--- a/components/offline_pages/offline_page_model.cc
+++ b/components/offline_pages/offline_page_model.cc
@@ -11,18 +11,35 @@
namespace offline_pages {
-OfflinePageModel::OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store)
- : store_(store.Pass()) {
+OfflinePageModel::OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store,
+ OfflinePageArchiver* archiver)
+ : store_(store.Pass()),
+ archiver_(archiver) {
+ DCHECK(archiver);
}
OfflinePageModel::~OfflinePageModel() {
}
void OfflinePageModel::Shutdown() {
- NOTIMPLEMENTED();
}
void OfflinePageModel::SavePageOffline(const GURL& url) {
+}
+
+void OfflinePageModel::OnCreateArchiveSuccess(
+ const OfflinePageArchiver::Request& request,
+ const base::FilePath& file_path) {
+ // TODO(fgorski): Match request against one of the expected requests
+ // TODO(fgorski): Create an entry in the offline pages metadata store for that
+ // request.
+ NOTIMPLEMENTED();
+}
+
+void OfflinePageModel::OnCreateArchiveFailure(
+ const OfflinePageArchiver::Request& request) {
+ // TODO(fgorski): Log error and clean up. Respond with failure.
+ // TODO(fgorski): Write offline page metadata in the store_.
NOTIMPLEMENTED();
}

Powered by Google App Engine
This is Rietveld 408576698