| Index: components/dom_distiller/core/distiller.cc
|
| diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
|
| index 070e6818d9139095afce639d9be775e473e1ff44..472b45361881b29c2f25b66210d88d058de50f6c 100644
|
| --- a/components/dom_distiller/core/distiller.cc
|
| +++ b/components/dom_distiller/core/distiller.cc
|
| @@ -29,15 +29,17 @@ const size_t kMaxPagesInArticle = 32;
|
| namespace dom_distiller {
|
|
|
| DistillerFactoryImpl::DistillerFactoryImpl(
|
| - scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory)
|
| - : distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()) {
|
| + scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory,
|
| + const dom_distiller::proto::DomDistillerOptions& dom_distiller_options)
|
| + : distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()),
|
| + dom_distiller_options_(dom_distiller_options) {
|
| }
|
|
|
| DistillerFactoryImpl::~DistillerFactoryImpl() {}
|
|
|
| scoped_ptr<Distiller> DistillerFactoryImpl::CreateDistiller() {
|
| - scoped_ptr<DistillerImpl> distiller(
|
| - new DistillerImpl(*distiller_url_fetcher_factory_));
|
| + scoped_ptr<DistillerImpl> distiller(new DistillerImpl(
|
| + *distiller_url_fetcher_factory_, dom_distiller_options_));
|
| return distiller.PassAs<Distiller>();
|
| }
|
|
|
| @@ -46,8 +48,10 @@ DistillerImpl::DistilledPageData::DistilledPageData() {}
|
| DistillerImpl::DistilledPageData::~DistilledPageData() {}
|
|
|
| DistillerImpl::DistillerImpl(
|
| - const DistillerURLFetcherFactory& distiller_url_fetcher_factory)
|
| + const DistillerURLFetcherFactory& distiller_url_fetcher_factory,
|
| + const dom_distiller::proto::DomDistillerOptions& dom_distiller_options)
|
| : distiller_url_fetcher_factory_(distiller_url_fetcher_factory),
|
| + dom_distiller_options_(dom_distiller_options),
|
| max_pages_in_article_(kMaxPagesInArticle),
|
| destruction_allowed_(true),
|
| weak_factory_(this) {
|
| @@ -120,6 +124,7 @@ void DistillerImpl::DistillNextPage() {
|
| started_pages_index_[page_num] = pages_.size() - 1;
|
| distiller_page_->DistillPage(
|
| url,
|
| + dom_distiller_options_,
|
| base::Bind(&DistillerImpl::OnPageDistillationFinished,
|
| weak_factory_.GetWeakPtr(),
|
| page_num,
|
|
|