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

Side by Side Diff: components/dom_distiller/core/distiller.cc

Issue 655143002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698