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

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

Issue 341563002: Theme Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor change to constant name Created 6 years, 6 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: chrome/browser/dom_distiller/dom_distiller_service_factory.cc
diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
index acee37daae9c40daa5416fad3168d9d34a1ca17b..1d96de57ec5c5b5a174cd9b98631b3ecddc2f806 100644
--- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
+++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "chrome/browser/profiles/profile.h"
#include "components/dom_distiller/content/distiller_page_web_contents.h"
#include "components/dom_distiller/core/distiller.h"
#include "components/dom_distiller/core/dom_distiller_store.h"
@@ -17,10 +18,12 @@ namespace dom_distiller {
DomDistillerContextKeyedService::DomDistillerContextKeyedService(
scoped_ptr<DomDistillerStoreInterface> store,
scoped_ptr<DistillerFactory> distiller_factory,
- scoped_ptr<DistillerPageFactory> distiller_page_factory)
+ scoped_ptr<DistillerPageFactory> distiller_page_factory,
+ scoped_ptr<ReaderModePrefs> reader_mode_prefs)
: DomDistillerService(store.Pass(),
distiller_factory.Pass(),
- distiller_page_factory.Pass()) {
+ distiller_page_factory.Pass(),
+ reader_mode_prefs.Pass()) {
}
// static
@@ -71,12 +74,16 @@ KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
}
scoped_ptr<DistillerFactory> distiller_factory(
new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass(), options));
+ scoped_ptr<ReaderModePrefs> reader_mode_prefs(
+ new ReaderModePrefs(Profile::FromBrowserContext(profile)));
+
DomDistillerContextKeyedService* service =
new DomDistillerContextKeyedService(
dom_distiller_store.PassAs<DomDistillerStoreInterface>(),
distiller_factory.Pass(),
- distiller_page_factory.Pass());
+ distiller_page_factory.Pass(),
+ reader_mode_prefs.Pass());
return service;
}

Powered by Google App Engine
This is Rietveld 408576698