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

Unified Diff: chrome/browser/profiles/profile_impl_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
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index a2680af2597f5ad08869f40ecc01320ebabcebf7..e0069d6f62312306e329cfe1c055ef72cc8f4886 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -538,8 +538,8 @@ void ProfileImplIOData::InitializeInternal(
new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
#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);
// Install the Offline Page Interceptor.
@@ -606,8 +606,8 @@ void ProfileImplIOData::
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
@@ -700,8 +700,8 @@ net::URLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
context->SetCookieStore(std::move(cookie_store));
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);
// The data reduction proxy interceptor should be as close to the network
// as possible.
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chromecast/browser/url_request_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698