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

Unified Diff: ios/chrome/browser/ios_chrome_io_thread.mm

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: ios/chrome/browser/ios_chrome_io_thread.mm
diff --git a/ios/chrome/browser/ios_chrome_io_thread.mm b/ios/chrome/browser/ios_chrome_io_thread.mm
index 72677ac24a425475e6685b69752d62f8238137ab..454d09b1c67ae52b3e1458c38c0525c80e892826 100644
--- a/ios/chrome/browser/ios_chrome_io_thread.mm
+++ b/ios/chrome/browser/ios_chrome_io_thread.mm
@@ -538,14 +538,14 @@ net::URLRequestContext* IOSChromeIOThread::ConstructSystemRequestContext(
context->set_proxy_service(globals->system_proxy_service.get());
context->set_ct_policy_enforcer(globals->ct_policy_enforcer.get());
- net::URLRequestJobFactoryImpl* system_job_factory =
- new net::URLRequestJobFactoryImpl();
+ std::unique_ptr<net::URLRequestJobFactoryImpl> system_job_factory =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
// Data URLs are always loaded through the system request context on iOS
// (due to UIWebView limitations).
bool set_protocol = system_job_factory->SetProtocolHandler(
url::kDataScheme, base::MakeUnique<net::DataProtocolHandler>());
DCHECK(set_protocol);
- globals->system_url_request_job_factory.reset(system_job_factory);
+ globals->system_url_request_job_factory = std::move(system_job_factory);
context->set_job_factory(globals->system_url_request_job_factory.get());
context->set_cookie_store(globals->system_cookie_store.get());
« no previous file with comments | « ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698