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

Unified Diff: ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc

Issue 2529283002: Save favicon during reading list distillation (Closed)
Patch Set: Cleanup Created 4 years 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: 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..cc707d179a1f8089be7bbfdd395f79f9247fa825 100644
--- a/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
+++ b/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/ptr_util.h"
Olivier 2016/12/13 14:29:10 remove
gambard 2016/12/13 16:25:53 Done.
#include "base/memory/singleton.h"
#include "base/threading/sequenced_worker_pool.h"
#include "components/dom_distiller/core/article_entry.h"
@@ -22,15 +23,15 @@
#include "components/leveldb_proto/proto_database_impl.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/web_state_dispatcher_impl.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,
@@ -67,11 +68,9 @@ DomDistillerService* DomDistillerServiceFactory::GetForBrowserState(
DomDistillerServiceFactory::DomDistillerServiceFactory()
: BrowserStateKeyedServiceFactory(
Olivier 2016/12/13 14:29:10 I think you know need some DependsOn here.
gambard 2016/12/13 16:25:53 Depends on what?
Olivier 2016/12/13 16:31:21 You are calling code that calls FaviconServiceFact
gambard 2016/12/16 10:26:47 Done.
"DomDistillerService",
- BrowserStateDependencyManager::GetInstance()) {
-}
+ BrowserStateDependencyManager::GetInstance()) {}
-DomDistillerServiceFactory::~DomDistillerServiceFactory() {
-}
+DomDistillerServiceFactory::~DomDistillerServiceFactory() {}
std::unique_ptr<KeyedService>
DomDistillerServiceFactory::BuildServiceInstanceFor(
@@ -90,8 +89,11 @@ DomDistillerServiceFactory::BuildServiceInstanceFor(
std::unique_ptr<DomDistillerStore> dom_distiller_store(
new DomDistillerStore(std::move(db), database_dir));
+ std::unique_ptr<WebStateDispatcher> web_state_dispatcher =
+ base::MakeUnique<WebStateDispatcherImpl>(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()));

Powered by Google App Engine
This is Rietveld 408576698