OLD | NEW |
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 "url/gurl.h" | 10 #include "url/gurl.h" |
10 | 11 |
11 namespace offline_pages { | 12 namespace offline_pages { |
12 | 13 |
13 OfflinePageModel::OfflinePageModel() { | 14 OfflinePageModel::OfflinePageModel(scoped_ptr<OfflinePageMetadataStore> store) |
| 15 : store_(store.Pass()) { |
14 } | 16 } |
15 | 17 |
16 OfflinePageModel::~OfflinePageModel() { | 18 OfflinePageModel::~OfflinePageModel() { |
17 } | 19 } |
18 | 20 |
19 void OfflinePageModel::Shutdown() { | 21 void OfflinePageModel::Shutdown() { |
20 NOTIMPLEMENTED(); | 22 NOTIMPLEMENTED(); |
21 } | 23 } |
22 | 24 |
23 void OfflinePageModel::SavePageOffline(const GURL& url) { | 25 void OfflinePageModel::SavePageOffline(const GURL& url) { |
24 NOTIMPLEMENTED(); | 26 NOTIMPLEMENTED(); |
25 } | 27 } |
26 | 28 |
27 std::vector<OfflinePageItem> OfflinePageModel::GetAllOfflinePages() { | 29 std::vector<OfflinePageItem> OfflinePageModel::GetAllOfflinePages() { |
28 NOTIMPLEMENTED(); | 30 NOTIMPLEMENTED(); |
29 return std::vector<OfflinePageItem>(); | 31 return std::vector<OfflinePageItem>(); |
30 } | 32 } |
31 | 33 |
| 34 OfflinePageMetadataStore* OfflinePageModel::GetStoreForTesting() { |
| 35 return store_.get(); |
| 36 } |
| 37 |
32 } // namespace offline_pages | 38 } // namespace offline_pages |
OLD | NEW |