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

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: rebase (needs fixing) Created 4 years, 2 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') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 6fd18bc1f8be691839ed5ab5e0887e8144b63e58..aa511e48c462c9d878bf8544c67941f5942dc4d8 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -251,8 +251,8 @@ void OffTheRecordProfileIOData::InitializeInternal(
new net::FtpNetworkLayer(main_context->host_resolver()));
#endif // !defined(DISABLE_FTP_SUPPORT)
- std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
- new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
InstallProtocolHandlers(main_job_factory.get(), protocol_handlers);
main_context_storage->set_job_factory(SetUpJobFactoryDefaults(
@@ -294,8 +294,8 @@ void OffTheRecordProfileIOData::
extensions_cookie_store_ = content::CreateCookieStore(cookie_config);
extensions_context->set_cookie_store(extensions_cookie_store_.get());
- std::unique_ptr<net::URLRequestJobFactoryImpl> extensions_job_factory(
- new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> extensions_job_factory =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
// TODO(shalev): The extensions_job_factory has a NULL NetworkDelegate.
// Without a network_delegate, this protocol handler will never
// handle file: requests, but as a side effect it makes
@@ -348,8 +348,8 @@ net::URLRequestContext* OffTheRecordProfileIOData::InitializeAppRequestContext(
context->SetHttpNetworkSession(std::move(http_network_session));
context->SetHttpTransactionFactory(std::move(app_http_cache));
- std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
- new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
InstallProtocolHandlers(job_factory.get(), protocol_handlers);
std::unique_ptr<net::URLRequestJobFactory> top_job_factory;
top_job_factory = SetUpJobFactoryDefaults(
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698