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

Side by Side Diff: ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h" 5 #include "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 std::unique_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory( 95 std::unique_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory(
96 new DistillerURLFetcherFactory(context->GetRequestContext())); 96 new DistillerURLFetcherFactory(context->GetRequestContext()));
97 97
98 dom_distiller::proto::DomDistillerOptions options; 98 dom_distiller::proto::DomDistillerOptions options;
99 std::unique_ptr<DistillerFactory> distiller_factory(new DistillerFactoryImpl( 99 std::unique_ptr<DistillerFactory> distiller_factory(new DistillerFactoryImpl(
100 std::move(distiller_url_fetcher_factory), options)); 100 std::move(distiller_url_fetcher_factory), options));
101 std::unique_ptr<DistilledPagePrefs> distilled_page_prefs( 101 std::unique_ptr<DistilledPagePrefs> distilled_page_prefs(
102 new DistilledPagePrefs( 102 new DistilledPagePrefs(
103 ios::ChromeBrowserState::FromBrowserState(context)->GetPrefs())); 103 ios::ChromeBrowserState::FromBrowserState(context)->GetPrefs()));
104 104
105 return base::WrapUnique(new DomDistillerKeyedService( 105 return base::MakeUnique<DomDistillerKeyedService>(
106 std::move(dom_distiller_store), std::move(distiller_factory), 106 std::move(dom_distiller_store), std::move(distiller_factory),
107 std::move(distiller_page_factory), std::move(distilled_page_prefs))); 107 std::move(distiller_page_factory), std::move(distilled_page_prefs));
108 } 108 }
109 109
110 web::BrowserState* DomDistillerServiceFactory::GetBrowserStateToUse( 110 web::BrowserState* DomDistillerServiceFactory::GetBrowserStateToUse(
111 web::BrowserState* context) const { 111 web::BrowserState* context) const {
112 // Makes normal profile and off-the-record profile use same service instance. 112 // Makes normal profile and off-the-record profile use same service instance.
113 return GetBrowserStateRedirectedInIncognito(context); 113 return GetBrowserStateRedirectedInIncognito(context);
114 } 114 }
115 115
116 } // namespace dom_distiller 116 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/test_chrome_browser_state.mm ('k') | ios/chrome/browser/favicon/favicon_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698