Index: net/url_request/url_request_context_builder.cc |
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc |
index a13d585ccd57bdd3b85ba5b7a6e2dbe982555983..a0e65c3842ce1201e2b183f32de72fb0346faec3 100644 |
--- a/net/url_request/url_request_context_builder.cc |
+++ b/net/url_request/url_request_context_builder.cc |
@@ -411,12 +411,14 @@ URLRequestContext* URLRequestContextBuilder::Build() { |
URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl; |
if (data_enabled_) |
- job_factory->SetProtocolHandler("data", new DataProtocolHandler); |
+ job_factory->SetProtocolHandler("data", |
+ make_scoped_ptr(new DataProtocolHandler)); |
#if !defined(DISABLE_FILE_SUPPORT) |
if (file_enabled_) { |
job_factory->SetProtocolHandler( |
- "file", new FileProtocolHandler(context->GetFileTaskRunner())); |
+ "file", |
+ make_scoped_ptr(new FileProtocolHandler(context->GetFileTaskRunner()))); |
} |
#endif // !defined(DISABLE_FILE_SUPPORT) |
@@ -424,8 +426,9 @@ URLRequestContext* URLRequestContextBuilder::Build() { |
if (ftp_enabled_) { |
ftp_transaction_factory_.reset( |
new FtpNetworkLayer(context->host_resolver())); |
- job_factory->SetProtocolHandler("ftp", |
- new FtpProtocolHandler(ftp_transaction_factory_.get())); |
+ job_factory->SetProtocolHandler( |
+ "ftp", make_scoped_ptr( |
+ new FtpProtocolHandler(ftp_transaction_factory_.get()))); |
} |
#endif // !defined(DISABLE_FTP_SUPPORT) |