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

Unified Diff: chrome/browser/io_thread.cc

Issue 1295523006: Using scoped_ptr for URLRequestJobFactoryImpl::SetProtocolHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing un-modified file Created 5 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 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 575223179e74d406ed0a5c3f1890475fe78fe1da..1aaee8b3757af15efdb207667ea366abc242bde8 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -855,21 +855,21 @@ void IOThread::Init() {
tracked_objects::ScopedTracker tracking_profile16(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"466432 IOThread::InitAsync::SetProtocolHandler"));
- job_factory->SetProtocolHandler(url::kDataScheme,
- new net::DataProtocolHandler());
+ job_factory->SetProtocolHandler(
+ url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler()));
job_factory->SetProtocolHandler(
url::kFileScheme,
- new net::FileProtocolHandler(
- content::BrowserThread::GetBlockingPool()->
- GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
+ make_scoped_ptr(new net::FileProtocolHandler(
+ content::BrowserThread::GetBlockingPool()
+ ->GetTaskRunnerWithShutdownBehavior(
+ 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,
- new net::FtpProtocolHandler(
- globals_->proxy_script_fetcher_ftp_transaction_factory.get()));
+ make_scoped_ptr(new net::FtpProtocolHandler(
+ globals_->proxy_script_fetcher_ftp_transaction_factory.get())));
#endif
globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass();
« no previous file with comments | « chrome/browser/extensions/extension_resource_protocols.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698