| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/dom_distiller/core/distiller.h" | 5 #include "components/dom_distiller/core/distiller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const dom_distiller::proto::DomDistillerOptions& dom_distiller_options) | 33 const dom_distiller::proto::DomDistillerOptions& dom_distiller_options) |
| 34 : distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()), | 34 : distiller_url_fetcher_factory_(distiller_url_fetcher_factory.Pass()), |
| 35 dom_distiller_options_(dom_distiller_options) { | 35 dom_distiller_options_(dom_distiller_options) { |
| 36 } | 36 } |
| 37 | 37 |
| 38 DistillerFactoryImpl::~DistillerFactoryImpl() {} | 38 DistillerFactoryImpl::~DistillerFactoryImpl() {} |
| 39 | 39 |
| 40 scoped_ptr<Distiller> DistillerFactoryImpl::CreateDistiller() { | 40 scoped_ptr<Distiller> DistillerFactoryImpl::CreateDistiller() { |
| 41 scoped_ptr<DistillerImpl> distiller(new DistillerImpl( | 41 scoped_ptr<DistillerImpl> distiller(new DistillerImpl( |
| 42 *distiller_url_fetcher_factory_, dom_distiller_options_)); | 42 *distiller_url_fetcher_factory_, dom_distiller_options_)); |
| 43 return distiller.PassAs<Distiller>(); | 43 return distiller.Pass(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 DistillerImpl::DistilledPageData::DistilledPageData() {} | 46 DistillerImpl::DistilledPageData::DistilledPageData() {} |
| 47 | 47 |
| 48 DistillerImpl::DistilledPageData::~DistilledPageData() {} | 48 DistillerImpl::DistilledPageData::~DistilledPageData() {} |
| 49 | 49 |
| 50 DistillerImpl::DistillerImpl( | 50 DistillerImpl::DistillerImpl( |
| 51 const DistillerURLFetcherFactory& distiller_url_fetcher_factory, | 51 const DistillerURLFetcherFactory& distiller_url_fetcher_factory, |
| 52 const dom_distiller::proto::DomDistillerOptions& dom_distiller_options) | 52 const dom_distiller::proto::DomDistillerOptions& dom_distiller_options) |
| 53 : distiller_url_fetcher_factory_(distiller_url_fetcher_factory), | 53 : distiller_url_fetcher_factory_(distiller_url_fetcher_factory), |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 DCHECK(finished_pages_index_.empty()); | 305 DCHECK(finished_pages_index_.empty()); |
| 306 | 306 |
| 307 base::AutoReset<bool> dont_delete_this_in_callback(&destruction_allowed_, | 307 base::AutoReset<bool> dont_delete_this_in_callback(&destruction_allowed_, |
| 308 false); | 308 false); |
| 309 finished_cb_.Run(article_proto.Pass()); | 309 finished_cb_.Run(article_proto.Pass()); |
| 310 finished_cb_.Reset(); | 310 finished_cb_.Reset(); |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 } // namespace dom_distiller | 314 } // namespace dom_distiller |
| OLD | NEW |