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

Unified Diff: components/dom_distiller/standalone/content_extractor.cc

Issue 254483003: Start requiring DistillerPage for calls to DomDistillerService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indent fixes (full git cl format) Created 6 years, 8 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/dom_distiller/standalone/content_extractor.cc
diff --git a/components/dom_distiller/standalone/content_extractor.cc b/components/dom_distiller/standalone/content_extractor.cc
index 67a3835ef6e454d50ae721866c6f66154f33bedf..760b1658890370b6331ba432544121559d786828 100644
--- a/components/dom_distiller/standalone/content_extractor.cc
+++ b/components/dom_distiller/standalone/content_extractor.cc
@@ -61,12 +61,13 @@ scoped_ptr<DomDistillerService> CreateDomDistillerService(
new DistillerPageWebContentsFactory(context));
scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory(
new DistillerURLFetcherFactory(context->GetRequestContext()));
- scoped_ptr<DistillerFactory> distiller_factory(new DistillerFactoryImpl(
- distiller_page_factory.Pass(), distiller_url_fetcher_factory.Pass()));
+ scoped_ptr<DistillerFactory> distiller_factory(
+ new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass()));
return scoped_ptr<DomDistillerService>(new DomDistillerService(
dom_distiller_store.PassAs<DomDistillerStoreInterface>(),
- distiller_factory.Pass()));
+ distiller_factory.Pass(),
+ distiller_page_factory.Pass()));
}
void AddComponentsResources() {
@@ -109,7 +110,8 @@ class ContentExtractionRequest : public ViewRequestDelegate {
public:
void Start(DomDistillerService* service, base::Closure finished_callback) {
finished_callback_ = finished_callback;
- viewer_handle_ = service->ViewUrl(this, url_);
+ viewer_handle_ =
+ service->ViewUrl(this, service->CreateDefaultDistillerPage(), url_);
}
DistilledArticleProto GetArticleCopy() {
« no previous file with comments | « components/dom_distiller/core/viewer_unittest.cc ('k') | components/dom_distiller/webui/dom_distiller_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698