| Index: chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| index 6923b62b4a0e36dfee96d96b1d4437a36f5fedb3..5178d41ec22c3b0f709a190b22353c63dd478fe3 100644
|
| --- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| +++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "chrome/browser/profiles/incognito_helpers.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| @@ -24,11 +26,10 @@ DomDistillerContextKeyedService::DomDistillerContextKeyedService(
|
| scoped_ptr<DistillerFactory> distiller_factory,
|
| scoped_ptr<DistillerPageFactory> distiller_page_factory,
|
| scoped_ptr<DistilledPagePrefs> distilled_page_prefs)
|
| - : DomDistillerService(store.Pass(),
|
| - distiller_factory.Pass(),
|
| - distiller_page_factory.Pass(),
|
| - distilled_page_prefs.Pass()) {
|
| -}
|
| + : DomDistillerService(std::move(store),
|
| + std::move(distiller_factory),
|
| + std::move(distiller_page_factory),
|
| + std::move(distilled_page_prefs)) {}
|
|
|
| // static
|
| DomDistillerServiceFactory* DomDistillerServiceFactory::GetInstance() {
|
| @@ -64,7 +65,7 @@ KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
|
| profile->GetPath().Append(FILE_PATH_LITERAL("Articles")));
|
|
|
| scoped_ptr<DomDistillerStore> dom_distiller_store(
|
| - new DomDistillerStore(db.Pass(), database_dir));
|
| + new DomDistillerStore(std::move(db), database_dir));
|
|
|
| scoped_ptr<DistillerPageFactory> distiller_page_factory(
|
| new DistillerPageWebContentsFactory(profile));
|
| @@ -81,16 +82,15 @@ KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
|
| // - "pagenum": detect anchors with numeric page numbers
|
| // Default is "next".
|
| options.set_pagination_algo("next");
|
| - scoped_ptr<DistillerFactory> distiller_factory(
|
| - new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass(), options));
|
| + scoped_ptr<DistillerFactory> distiller_factory(new DistillerFactoryImpl(
|
| + std::move(distiller_url_fetcher_factory), options));
|
| scoped_ptr<DistilledPagePrefs> distilled_page_prefs(
|
| new DistilledPagePrefs(Profile::FromBrowserContext(profile)->GetPrefs()));
|
|
|
| DomDistillerContextKeyedService* service =
|
| - new DomDistillerContextKeyedService(dom_distiller_store.Pass(),
|
| - distiller_factory.Pass(),
|
| - distiller_page_factory.Pass(),
|
| - distilled_page_prefs.Pass());
|
| + new DomDistillerContextKeyedService(
|
| + std::move(dom_distiller_store), std::move(distiller_factory),
|
| + std::move(distiller_page_factory), std::move(distilled_page_prefs));
|
|
|
| return service;
|
| }
|
|
|