OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/core/prefetch/prefetch_service_impl.h" | 5 #include "components/offline_pages/core/prefetch/prefetch_service_impl.h" |
| 6 #include "base/memory/ptr_util.h" |
6 | 7 |
7 namespace offline_pages { | 8 namespace offline_pages { |
8 | 9 |
9 PrefetchServiceImpl::PrefetchServiceImpl() {} | 10 PrefetchServiceImpl::PrefetchServiceImpl( |
| 11 std::unique_ptr<GCMAppHandler> gcm_app_handler) |
| 12 : gcm_app_handler_(std::move(gcm_app_handler)) {} |
10 PrefetchServiceImpl::~PrefetchServiceImpl() = default; | 13 PrefetchServiceImpl::~PrefetchServiceImpl() = default; |
11 | 14 |
| 15 void PrefetchServiceImpl::ObserveContentSuggestionsService( |
| 16 ntp_snippets::ContentSuggestionsService* service) { |
| 17 suggested_articles_observer_ = |
| 18 base::MakeUnique<SuggestedArticlesObserver>(service, this); |
| 19 } |
| 20 |
12 void PrefetchServiceImpl::AddCandidatePrefetchURLs( | 21 void PrefetchServiceImpl::AddCandidatePrefetchURLs( |
13 const std::vector<PrefetchURL>& url_suggestions) { | 22 const std::vector<PrefetchURL>& url_suggestions) { |
14 NOTIMPLEMENTED(); | 23 NOTIMPLEMENTED(); |
15 } | 24 } |
16 void PrefetchServiceImpl::RemoveAllUnprocessedPrefetchURLs( | 25 void PrefetchServiceImpl::RemoveAllUnprocessedPrefetchURLs( |
17 const std::string& name_space) { | 26 const std::string& name_space) { |
18 NOTIMPLEMENTED(); | 27 NOTIMPLEMENTED(); |
19 } | 28 } |
20 | 29 |
21 void PrefetchServiceImpl::RemovePrefetchURLsByClientId( | 30 void PrefetchServiceImpl::RemovePrefetchURLsByClientId( |
22 const ClientId& client_id) { | 31 const ClientId& client_id) { |
23 NOTIMPLEMENTED(); | 32 NOTIMPLEMENTED(); |
24 } | 33 } |
25 | 34 |
26 void PrefetchServiceImpl::BeginBackgroundTask( | 35 void PrefetchServiceImpl::BeginBackgroundTask( |
27 std::unique_ptr<ScopedBackgroundTask> task) { | 36 std::unique_ptr<ScopedBackgroundTask> task) { |
28 NOTIMPLEMENTED(); | 37 NOTIMPLEMENTED(); |
29 } | 38 } |
30 | 39 |
31 void PrefetchServiceImpl::StopBackgroundTask(ScopedBackgroundTask* task) { | 40 void PrefetchServiceImpl::StopBackgroundTask(ScopedBackgroundTask* task) { |
32 NOTIMPLEMENTED(); | 41 NOTIMPLEMENTED(); |
33 } | 42 } |
34 | 43 |
35 void PrefetchServiceImpl::Shutdown() {} | 44 void PrefetchServiceImpl::Shutdown() {} |
36 | 45 |
37 } // namespace offline_pages | 46 } // namespace offline_pages |
OLD | NEW |