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

Unified Diff: components/offline_pages/core/prefetch/prefetch_service_impl.cc

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Dispatcher instance is now injected into Service. Minor changes. Created 3 years, 7 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/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

Powered by Google App Engine
This is Rietveld 408576698