| Index: ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| diff --git a/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| index 2367b1283b5611de59c520080d8efea42230adb7..ac9fbc4e855a5f05b6587a3c40c3092ec6e48c7d 100644
|
| --- a/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| +++ b/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| @@ -20,17 +20,20 @@
|
| #include "components/keyed_service/ios/browser_state_dependency_manager.h"
|
| #include "components/leveldb_proto/proto_database.h"
|
| #include "components/leveldb_proto/proto_database_impl.h"
|
| +#include "ios/chrome/browser/bookmarks/bookmark_model_factory.h"
|
| #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h"
|
| #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
|
| +#include "ios/chrome/browser/dom_distiller/favicon_web_state_dispatcher_impl.h"
|
| +#include "ios/chrome/browser/favicon/favicon_service_factory.h"
|
| +#include "ios/chrome/browser/history/history_service_factory.h"
|
| #include "ios/web/public/browser_state.h"
|
| #include "ios/web/public/web_thread.h"
|
|
|
| namespace {
|
| // A simple wrapper for DomDistillerService to expose it as a
|
| // KeyedService.
|
| -class DomDistillerKeyedService
|
| - : public KeyedService,
|
| - public dom_distiller::DomDistillerService {
|
| +class DomDistillerKeyedService : public KeyedService,
|
| + public dom_distiller::DomDistillerService {
|
| public:
|
| DomDistillerKeyedService(
|
| std::unique_ptr<dom_distiller::DomDistillerStoreInterface> store,
|
| @@ -68,10 +71,12 @@ DomDistillerServiceFactory::DomDistillerServiceFactory()
|
| : BrowserStateKeyedServiceFactory(
|
| "DomDistillerService",
|
| BrowserStateDependencyManager::GetInstance()) {
|
| + DependsOn(ios::FaviconServiceFactory::GetInstance());
|
| + DependsOn(ios::HistoryServiceFactory::GetInstance());
|
| + DependsOn(ios::BookmarkModelFactory::GetInstance());
|
| }
|
|
|
| -DomDistillerServiceFactory::~DomDistillerServiceFactory() {
|
| -}
|
| +DomDistillerServiceFactory::~DomDistillerServiceFactory() {}
|
|
|
| std::unique_ptr<KeyedService>
|
| DomDistillerServiceFactory::BuildServiceInstanceFor(
|
| @@ -90,8 +95,11 @@ DomDistillerServiceFactory::BuildServiceInstanceFor(
|
| std::unique_ptr<DomDistillerStore> dom_distiller_store(
|
| new DomDistillerStore(std::move(db), database_dir));
|
|
|
| + std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher =
|
| + base::MakeUnique<FaviconWebStateDispatcherImpl>(context);
|
| std::unique_ptr<DistillerPageFactory> distiller_page_factory(
|
| - new DistillerPageFactoryIOS(context));
|
| + new DistillerPageFactoryIOS(std::move(web_state_dispatcher)));
|
| +
|
| std::unique_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory(
|
| new DistillerURLFetcherFactory(context->GetRequestContext()));
|
|
|
|
|