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

Unified Diff: chromecast/browser/url_request_context_factory.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: chromecast/browser/url_request_context_factory.cc
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc
index 693a220f3bc0bace31141e6f44d88ff0d73362f9..a1008713d69cfe746f58d0b395435a1f4276a5a2 100644
--- a/chromecast/browser/url_request_context_factory.cc
+++ b/chromecast/browser/url_request_context_factory.cc
@@ -238,22 +238,21 @@ void URLRequestContextFactory::InitializeMainContextDependencies(
it != protocol_handlers->end();
++it) {
set_protocol = job_factory->SetProtocolHandler(
- it->first, it->second.release());
+ it->first, make_scoped_ptr(it->second.release()));
DCHECK(set_protocol);
}
set_protocol = job_factory->SetProtocolHandler(
- url::kDataScheme,
- new net::DataProtocolHandler);
+ url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler));
DCHECK(set_protocol);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableLocalFileAccesses)) {
set_protocol = 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))));
DCHECK(set_protocol);
}

Powered by Google App Engine
This is Rietveld 408576698