Index: components/offline_pages/content/prefetch_service_factory.cc |
diff --git a/components/offline_pages/content/prefetch_service_factory.cc b/components/offline_pages/content/prefetch_service_factory.cc |
index ffe46b2630825585089479fcd31dfa4165481b54..16247f86e049d2c2248b755cedb229fd79c4f043 100644 |
--- a/components/offline_pages/content/prefetch_service_factory.cc |
+++ b/components/offline_pages/content/prefetch_service_factory.cc |
@@ -4,9 +4,14 @@ |
#include "components/offline_pages/content/prefetch_service_factory.h" |
+#include <memory> |
+ |
+#include "base/memory/ptr_util.h" |
#include "base/memory/singleton.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
+#include "components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h" |
#include "components/offline_pages/core/prefetch/prefetch_service_impl.h" |
+#include "components/offline_pages/core/prefetch/prefetch_store.h" |
#include "content/public/browser/browser_context.h" |
namespace offline_pages { |
@@ -30,7 +35,12 @@ PrefetchService* PrefetchServiceFactory::GetForBrowserContext( |
KeyedService* PrefetchServiceFactory::BuildServiceInstanceFor( |
content::BrowserContext* context) const { |
- return new PrefetchServiceImpl(); |
+ // TODO(carlosk): instantiate actual store implementation once it exists. |
+ std::unique_ptr<PrefetchStore> prefetch_store; |
+ std::unique_ptr<PrefetchDispatcher> prefetch_dispatcher_impl = |
fgorski
2017/05/30 17:21:45
nit: prefetch_dispatcher would be suitable I guess
carlosk
2017/06/01 01:49:59
As here it is specifically an instance of the impl
|
+ base::MakeUnique<PrefetchDispatcherImpl>(); |
+ return new PrefetchServiceImpl(std::move(prefetch_store), |
+ std::move(prefetch_dispatcher_impl)); |
} |
} // namespace offline_pages |