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

Side by Side Diff: chrome/browser/io_thread.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 context->set_transport_security_state( 862 context->set_transport_security_state(
863 globals->transport_security_state.get()); 863 globals->transport_security_state.get());
864 context->set_cert_transparency_verifier( 864 context->set_cert_transparency_verifier(
865 globals->cert_transparency_verifier.get()); 865 globals->cert_transparency_verifier.get());
866 context->set_ct_policy_enforcer(globals->ct_policy_enforcer.get()); 866 context->set_ct_policy_enforcer(globals->ct_policy_enforcer.get());
867 context->set_ssl_config_service(globals->ssl_config_service.get()); 867 context->set_ssl_config_service(globals->ssl_config_service.get());
868 context->set_http_auth_handler_factory( 868 context->set_http_auth_handler_factory(
869 globals->http_auth_handler_factory.get()); 869 globals->http_auth_handler_factory.get());
870 context->set_proxy_service(globals->system_proxy_service.get()); 870 context->set_proxy_service(globals->system_proxy_service.get());
871 871
872 globals->system_url_request_job_factory.reset( 872 globals->system_url_request_job_factory =
873 new net::URLRequestJobFactoryImpl()); 873 net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
874 context->set_job_factory(globals->system_url_request_job_factory.get()); 874 context->set_job_factory(globals->system_url_request_job_factory.get());
875 875
876 context->set_cookie_store(globals->system_cookie_store.get()); 876 context->set_cookie_store(globals->system_cookie_store.get());
877 context->set_channel_id_service( 877 context->set_channel_id_service(
878 globals->system_channel_id_service.get()); 878 globals->system_channel_id_service.get());
879 context->set_network_delegate(globals->system_network_delegate.get()); 879 context->set_network_delegate(globals->system_network_delegate.get());
880 context->set_http_user_agent_settings( 880 context->set_http_user_agent_settings(
881 globals->http_user_agent_settings.get()); 881 globals->http_user_agent_settings.get());
882 context->set_network_quality_estimator( 882 context->set_network_quality_estimator(
883 globals->network_quality_estimator.get()); 883 globals->network_quality_estimator.get());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 context, &session_params); 1043 context, &session_params);
1044 1044
1045 globals->proxy_script_fetcher_http_network_session.reset( 1045 globals->proxy_script_fetcher_http_network_session.reset(
1046 new net::HttpNetworkSession(session_params)); 1046 new net::HttpNetworkSession(session_params));
1047 globals->proxy_script_fetcher_http_transaction_factory.reset( 1047 globals->proxy_script_fetcher_http_transaction_factory.reset(
1048 new net::HttpNetworkLayer( 1048 new net::HttpNetworkLayer(
1049 globals->proxy_script_fetcher_http_network_session.get())); 1049 globals->proxy_script_fetcher_http_network_session.get()));
1050 context->set_http_transaction_factory( 1050 context->set_http_transaction_factory(
1051 globals->proxy_script_fetcher_http_transaction_factory.get()); 1051 globals->proxy_script_fetcher_http_transaction_factory.get());
1052 1052
1053 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( 1053 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory =
1054 new net::URLRequestJobFactoryImpl()); 1054 net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
1055 1055
1056 job_factory->SetProtocolHandler(url::kDataScheme, 1056 job_factory->SetProtocolHandler(url::kDataScheme,
1057 base::MakeUnique<net::DataProtocolHandler>()); 1057 base::MakeUnique<net::DataProtocolHandler>());
1058 job_factory->SetProtocolHandler( 1058 job_factory->SetProtocolHandler(
1059 url::kFileScheme, 1059 url::kFileScheme,
1060 base::MakeUnique<net::FileProtocolHandler>( 1060 base::MakeUnique<net::FileProtocolHandler>(
1061 content::BrowserThread::GetBlockingPool() 1061 content::BrowserThread::GetBlockingPool()
1062 ->GetTaskRunnerWithShutdownBehavior( 1062 ->GetTaskRunnerWithShutdownBehavior(
1063 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); 1063 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
1064 #if !defined(DISABLE_FTP_SUPPORT) 1064 #if !defined(DISABLE_FTP_SUPPORT)
(...skipping 13 matching lines...) Expand all
1078 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1078 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1079 // system URLRequestContext too. There's no reason this should be tied to a 1079 // system URLRequestContext too. There's no reason this should be tied to a
1080 // profile. 1080 // profile.
1081 return context; 1081 return context;
1082 } 1082 }
1083 1083
1084 const metrics::UpdateUsagePrefCallbackType& 1084 const metrics::UpdateUsagePrefCallbackType&
1085 IOThread::GetMetricsDataUseForwarder() { 1085 IOThread::GetMetricsDataUseForwarder() {
1086 return metrics_data_use_forwarder_; 1086 return metrics_data_use_forwarder_;
1087 } 1087 }
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_url_request_job_factory.cc ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698