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

Unified Diff: chrome/browser/profiles/profile_io_data.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 | « chrome/browser/io_thread.cc ('k') | chromecast/browser/url_request_context_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index a8f67ea8144871156e3bc8bcb7dd2687be1ab299..8a077ca1754f634093e00df8d916a22f318b03dc 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -744,7 +744,7 @@ void ProfileIOData::InstallProtocolHandlers(
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();
@@ -1163,10 +1163,10 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
// ProfileIOData::IsHandledProtocol().
bool 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);
#if defined(ENABLE_EXTENSIONS)
@@ -1184,13 +1184,14 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
DCHECK(set_protocol);
#endif
set_protocol = job_factory->SetProtocolHandler(
- url::kDataScheme, new net::DataProtocolHandler());
+ url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler()));
DCHECK(set_protocol);
#if defined(OS_CHROMEOS)
if (profile_params_) {
set_protocol = job_factory->SetProtocolHandler(
content::kExternalFileScheme,
- new chromeos::ExternalFileProtocolHandler(profile_params_->profile));
+ make_scoped_ptr(new chromeos::ExternalFileProtocolHandler(
+ profile_params_->profile)));
DCHECK(set_protocol);
}
#endif // defined(OS_CHROMEOS)
@@ -1198,18 +1199,19 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
set_protocol = job_factory->SetProtocolHandler(
url::kContentScheme,
content::ContentProtocolHandler::Create(
- content::BrowserThread::GetBlockingPool()->
- GetTaskRunnerWithShutdownBehavior(
+ content::BrowserThread::GetBlockingPool()
+ ->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
#endif
- job_factory->SetProtocolHandler(url::kAboutScheme,
- new about_handler::AboutProtocolHandler());
+ job_factory->SetProtocolHandler(
+ url::kAboutScheme,
+ make_scoped_ptr(new about_handler::AboutProtocolHandler()));
#if !defined(DISABLE_FTP_SUPPORT)
DCHECK(ftp_transaction_factory);
job_factory->SetProtocolHandler(
url::kFtpScheme,
- new net::FtpProtocolHandler(ftp_transaction_factory));
+ make_scoped_ptr(new net::FtpProtocolHandler(ftp_transaction_factory)));
#endif // !defined(DISABLE_FTP_SUPPORT)
#if defined(DEBUG_DEVTOOLS)
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chromecast/browser/url_request_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698