summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorsvaldez <svaldez@chromium.org>2015-08-24 14:36:20 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-24 21:39:35 +0000
commit5d58c9eb2baa203be1b84ac88cde82c59d72f143 (patch)
tree3446bf04741d0b6e307fdc0b51593323834e680d /chrome/browser/io_thread.cc
parentcc19cb9a644b1c385b36b108bd9bf5438d8d1f2b (diff)
downloadchromium_src-5d58c9eb2baa203be1b84ac88cde82c59d72f143.zip
chromium_src-5d58c9eb2baa203be1b84ac88cde82c59d72f143.tar.gz
chromium_src-5d58c9eb2baa203be1b84ac88cde82c59d72f143.tar.bz2
Using scoped_ptr for URLRequestJobFactoryImpl::SetProtocolHandler
Adding scoped_ptr to call in order to take ownership of handler. BUG=517161 Review URL: https://codereview.chromium.org/1295523006 Cr-Commit-Position: refs/heads/master@{#345185}
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 1df1aff..3b513e2 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -849,21 +849,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();