| Index: components/dom_distiller/core/distiller.cc
|
| diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
|
| index d720a5be6bb8750a80f7ed9fb433f6f6fd8f59bc..71ad507408aaa54820e124571da445b470b0c924 100644
|
| --- a/components/dom_distiller/core/distiller.cc
|
| +++ b/components/dom_distiller/core/distiller.cc
|
| @@ -29,16 +29,14 @@ const size_t kMaxPagesInArticle = 32;
|
| namespace dom_distiller {
|
|
|
| DistillerFactoryImpl::DistillerFactoryImpl(
|
| - scoped_ptr<DistillerPageFactory> distiller_page_factory,
|
| scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory)
|
| - : distiller_page_factory_(distiller_page_factory.Pass()),
|
| - distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()) {}
|
| + : distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()) {}
|
|
|
| DistillerFactoryImpl::~DistillerFactoryImpl() {}
|
|
|
| scoped_ptr<Distiller> DistillerFactoryImpl::CreateDistiller() {
|
| scoped_ptr<DistillerImpl> distiller(new DistillerImpl(
|
| - *distiller_page_factory_, *distiller_url_fetcher_factory_));
|
| + *distiller_url_fetcher_factory_));
|
| return distiller.PassAs<Distiller>();
|
| }
|
|
|
| @@ -47,14 +45,11 @@ DistillerImpl::DistilledPageData::DistilledPageData() {}
|
| DistillerImpl::DistilledPageData::~DistilledPageData() {}
|
|
|
| DistillerImpl::DistillerImpl(
|
| - const DistillerPageFactory& distiller_page_factory,
|
| const DistillerURLFetcherFactory& distiller_url_fetcher_factory)
|
| : distiller_url_fetcher_factory_(distiller_url_fetcher_factory),
|
| max_pages_in_article_(kMaxPagesInArticle),
|
| destruction_allowed_(true),
|
| - weak_factory_(this) {
|
| - distiller_page_ = distiller_page_factory.CreateDistillerPage().Pass();
|
| -}
|
| + weak_factory_(this) {}
|
|
|
| DistillerImpl::~DistillerImpl() {
|
| DCHECK(destruction_allowed_);
|
| @@ -96,9 +91,11 @@ DistillerImpl::DistilledPageData* DistillerImpl::GetPageAtIndex(size_t index)
|
| }
|
|
|
| void DistillerImpl::DistillPage(const GURL& url,
|
| + scoped_ptr<DistillerPage> distiller_page,
|
| const DistillationFinishedCallback& finished_cb,
|
| const DistillationUpdateCallback& update_cb) {
|
| DCHECK(AreAllPagesFinished());
|
| + distiller_page_ = distiller_page.Pass();
|
| finished_cb_ = finished_cb;
|
| update_cb_ = update_cb;
|
|
|
|
|