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

Unified Diff: content/shell/browser/shell_url_request_context_getter.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
« no previous file with comments | « content/public/test/mock_blob_url_request_context.cc ('k') | extensions/browser/extension_protocols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_url_request_context_getter.cc
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index cafda2de06448a5cec22cae201a3ac5115ed60aa..6554e05119881523f4fc3171c2a1b8ca15ecebff 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -52,7 +52,7 @@ void InstallProtocolHandlers(net::URLRequestJobFactoryImpl* job_factory,
it != protocol_handlers->end();
++it) {
bool set_protocol = job_factory->SetProtocolHandler(
- it->first, it->second.release());
+ it->first, make_scoped_ptr(it->second.release()));
DCHECK(set_protocol);
}
protocol_handlers->clear();
@@ -209,14 +209,14 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
// ShellContentBrowserClient::IsHandledURL().
InstallProtocolHandlers(job_factory.get(), &protocol_handlers_);
bool set_protocol = job_factory->SetProtocolHandler(
- url::kDataScheme, new net::DataProtocolHandler);
+ url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler));
DCHECK(set_protocol);
#if !defined(DISABLE_FILE_SUPPORT)
set_protocol = job_factory->SetProtocolHandler(
url::kFileScheme,
- new net::FileProtocolHandler(
+ make_scoped_ptr(new net::FileProtocolHandler(
BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
DCHECK(set_protocol);
#endif
« no previous file with comments | « content/public/test/mock_blob_url_request_context.cc ('k') | extensions/browser/extension_protocols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698