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

Side by Side 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 feedback to documentation 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/offline_pages/offline_page_model.h" 5 #include "components/offline_pages/offline_page_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/offline_pages/offline_page_item.h" 8 #include "components/offline_pages/offline_page_item.h"
9 #include "components/offline_pages/offline_page_metadata_store.h" 9 #include "components/offline_pages/offline_page_metadata_store.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace offline_pages { 12 namespace offline_pages {
13 13
14 OfflinePageModel::OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store) 14 OfflinePageModel::OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store,
15 : store_(store.Pass()) { 15 OfflinePageArchiver* archiver)
16 : store_(store.Pass()),
17 archiver_(archiver) {
18 DCHECK(archiver);
16 } 19 }
17 20
18 OfflinePageModel::~OfflinePageModel() { 21 OfflinePageModel::~OfflinePageModel() {
19 } 22 }
20 23
21 void OfflinePageModel::Shutdown() { 24 void OfflinePageModel::Shutdown() {
25 }
26
27 void OfflinePageModel::SavePageOffline(const GURL& url) {
28 }
29
30 void OfflinePageModel::OnCreateArchiveDone(
31 OfflinePageArchiver::Request* request,
32 OfflinePageArchiver::ArchiverResult result,
33 const base::FilePath& file_path) {
34 // TODO(fgorski): Match request against one of the expected requests
35 // TODO(fgorski): Create an entry in the offline pages metadata store for that
36 // request.
22 NOTIMPLEMENTED(); 37 NOTIMPLEMENTED();
23 } 38 }
24 39
25 void OfflinePageModel::SavePageOffline(const GURL& url) {
26 NOTIMPLEMENTED();
27 }
28
29 std::vector<OfflinePageItem> OfflinePageModel::GetAllOfflinePages() { 40 std::vector<OfflinePageItem> OfflinePageModel::GetAllOfflinePages() {
30 NOTIMPLEMENTED(); 41 NOTIMPLEMENTED();
31 return std::vector<OfflinePageItem>(); 42 return std::vector<OfflinePageItem>();
32 } 43 }
33 44
34 OfflinePageMetadataStore* OfflinePageModel::GetStoreForTesting() { 45 OfflinePageMetadataStore* OfflinePageModel::GetStoreForTesting() {
35 return store_.get(); 46 return store_.get();
36 } 47 }
37 48
38 } // namespace offline_pages 49 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_model.h ('k') | components/offline_pages/offline_page_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698