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..ef9b3931efae139c07a219cbf84802af0fa0e84c 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) |
@@ -1175,41 +1175,43 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults( |
bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE; |
set_protocol = job_factory->SetProtocolHandler( |
extensions::kExtensionScheme, |
- extensions::CreateExtensionProtocolHandler(is_incognito, |
- extension_info_map_.get())); |
+ make_scoped_ptr(extensions::CreateExtensionProtocolHandler( |
davidben
2015/08/18 20:40:37
This would probably be better having CreateExtensi
svaldez
2015/08/18 22:12:43
Done.
|
+ is_incognito, extension_info_map_.get()))); |
DCHECK(set_protocol); |
set_protocol = job_factory->SetProtocolHandler( |
extensions::kExtensionResourceScheme, |
- CreateExtensionResourceProtocolHandler()); |
+ make_scoped_ptr(CreateExtensionResourceProtocolHandler())); |
davidben
2015/08/18 20:40:37
Ditto.
svaldez
2015/08/18 22:12:43
Done.
|
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) |
#if defined(OS_ANDROID) |
set_protocol = job_factory->SetProtocolHandler( |
url::kContentScheme, |
- content::ContentProtocolHandler::Create( |
- content::BrowserThread::GetBlockingPool()-> |
- GetTaskRunnerWithShutdownBehavior( |
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
+ make_scoped_ptr(content::ContentProtocolHandler::Create( |
davidben
2015/08/18 20:40:37
Ditto.
svaldez
2015/08/18 22:12:43
Done.
|
+ 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) |