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

Unified Diff: chrome/browser/io_thread.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index f7cf37e78d4bb088eaee3eba1c4df6860c8170cc..5406113b6fc43047d2539283eadce1d691417bb6 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1049,21 +1049,21 @@ net::URLRequestContext* IOThread::ConstructProxyScriptFetcherContext(
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
- job_factory->SetProtocolHandler(
- url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler()));
+ job_factory->SetProtocolHandler(url::kDataScheme,
+ base::MakeUnique<net::DataProtocolHandler>());
job_factory->SetProtocolHandler(
url::kFileScheme,
- base::WrapUnique(new net::FileProtocolHandler(
+ base::MakeUnique<net::FileProtocolHandler>(
content::BrowserThread::GetBlockingPool()
->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
#if !defined(DISABLE_FTP_SUPPORT)
globals->proxy_script_fetcher_ftp_transaction_factory.reset(
new net::FtpNetworkLayer(globals->host_resolver.get()));
job_factory->SetProtocolHandler(
url::kFtpScheme,
- base::WrapUnique(new net::FtpProtocolHandler(
- globals->proxy_script_fetcher_ftp_transaction_factory.get())));
+ base::MakeUnique<net::FtpProtocolHandler>(
+ globals->proxy_script_fetcher_ftp_transaction_factory.get()));
#endif
globals->proxy_script_fetcher_url_request_job_factory =
std::move(job_factory);
« no previous file with comments | « chrome/browser/history/history_service_factory.cc ('k') | chrome/browser/media/android/router/media_router_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698