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

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: Addressing more feedback from dimich 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..8878bbb036e4d53b93f58119fe6f8c43ed7c5b37 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(
+ 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(
+ OfflinePageArchiver::Request* request,
+ OfflinePageArchiver::ArchiveError error) {
+ // TODO(fgorski): Log error and clean up. Respond with failure.
NOTIMPLEMENTED();
}

Powered by Google App Engine
This is Rietveld 408576698