Index: components/offline_pages/core/prefetch/prefetch_service_impl.cc |
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.cc b/components/offline_pages/core/prefetch/prefetch_service_impl.cc |
index 9e86aba0b591bdd968aaa7e42cfabc1545323a42..a95461e5f2def8f00ec74f101dd6f468cad184ef 100644 |
--- a/components/offline_pages/core/prefetch/prefetch_service_impl.cc |
+++ b/components/offline_pages/core/prefetch/prefetch_service_impl.cc |
@@ -6,13 +6,16 @@ |
#include <utility> |
-#include "base/memory/ptr_util.h" |
#include "components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h" |
namespace offline_pages { |
-PrefetchServiceImpl::PrefetchServiceImpl() |
- : dispatcher_(base::MakeUnique<PrefetchDispatcherImpl>()) {} |
+PrefetchServiceImpl::PrefetchServiceImpl( |
+ std::unique_ptr<PrefetchStore> store, |
+ std::unique_ptr<PrefetchDispatcher> dispatcher) |
+ : store_(std::move(store)), dispatcher_(std::move(dispatcher)) { |
+ dispatcher_->SetService(this); |
+} |
PrefetchServiceImpl::~PrefetchServiceImpl() = default; |
@@ -20,6 +23,10 @@ PrefetchDispatcher* PrefetchServiceImpl::GetDispatcher() { |
return dispatcher_.get(); |
}; |
+PrefetchStore* PrefetchServiceImpl::GetStore() { |
+ return store_.get(); |
+}; |
+ |
void PrefetchServiceImpl::Shutdown() {} |
} // namespace offline_pages |