OLD | NEW |
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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "net/cert/multi_log_ct_verifier.h" | 71 #include "net/cert/multi_log_ct_verifier.h" |
72 #include "net/cert/multi_threaded_cert_verifier.h" | 72 #include "net/cert/multi_threaded_cert_verifier.h" |
73 #include "net/cookies/cookie_store.h" | 73 #include "net/cookies/cookie_store.h" |
74 #include "net/dns/host_cache.h" | 74 #include "net/dns/host_cache.h" |
75 #include "net/dns/host_resolver.h" | 75 #include "net/dns/host_resolver.h" |
76 #include "net/dns/mapped_host_resolver.h" | 76 #include "net/dns/mapped_host_resolver.h" |
77 #include "net/ftp/ftp_network_layer.h" | 77 #include "net/ftp/ftp_network_layer.h" |
78 #include "net/http/http_auth_filter.h" | 78 #include "net/http/http_auth_filter.h" |
79 #include "net/http/http_auth_handler_factory.h" | 79 #include "net/http/http_auth_handler_factory.h" |
80 #include "net/http/http_auth_preferences.h" | 80 #include "net/http/http_auth_preferences.h" |
| 81 #include "net/http/http_features.h" |
81 #include "net/http/http_network_layer.h" | 82 #include "net/http/http_network_layer.h" |
82 #include "net/http/http_network_session.h" | 83 #include "net/http/http_network_session.h" |
83 #include "net/http/http_server_properties_impl.h" | 84 #include "net/http/http_server_properties_impl.h" |
84 #include "net/proxy/proxy_config_service.h" | 85 #include "net/proxy/proxy_config_service.h" |
85 #include "net/proxy/proxy_script_fetcher_impl.h" | 86 #include "net/proxy/proxy_script_fetcher_impl.h" |
86 #include "net/proxy/proxy_service.h" | 87 #include "net/proxy/proxy_service.h" |
87 #include "net/quic/crypto/crypto_protocol.h" | 88 #include "net/quic/crypto/crypto_protocol.h" |
88 #include "net/quic/quic_protocol.h" | 89 #include "net/quic/quic_protocol.h" |
89 #include "net/quic/quic_utils.h" | 90 #include "net/quic/quic_utils.h" |
90 #include "net/socket/ssl_client_socket.h" | 91 #include "net/socket/ssl_client_socket.h" |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 836 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
836 // is fixed. | 837 // is fixed. |
837 tracked_objects::ScopedTracker tracking_profile12_5( | 838 tracked_objects::ScopedTracker tracking_profile12_5( |
838 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 839 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
839 "466432 IOThread::InitAsync::QuicConfiguration")); | 840 "466432 IOThread::InitAsync::QuicConfiguration")); |
840 ConfigureQuic(command_line); | 841 ConfigureQuic(command_line); |
841 if (command_line.HasSwitch( | 842 if (command_line.HasSwitch( |
842 switches::kEnableUserAlternateProtocolPorts)) { | 843 switches::kEnableUserAlternateProtocolPorts)) { |
843 globals_->enable_user_alternate_protocol_ports = true; | 844 globals_->enable_user_alternate_protocol_ports = true; |
844 } | 845 } |
| 846 globals_->enable_brotli.set(net::features::IsBrotliEncodingEnabled()); |
845 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 847 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
846 // is fixed. | 848 // is fixed. |
847 tracked_objects::ScopedTracker tracking_profile13( | 849 tracked_objects::ScopedTracker tracking_profile13( |
848 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 850 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
849 "466432 IOThread::InitAsync::InitializeNetworkOptions")); | 851 "466432 IOThread::InitAsync::InitializeNetworkOptions")); |
850 InitializeNetworkOptions(command_line); | 852 InitializeNetworkOptions(command_line); |
851 | 853 |
852 TRACE_EVENT_BEGIN0("startup", | 854 TRACE_EVENT_BEGIN0("startup", |
853 "IOThread::Init:ProxyScriptFetcherRequestContext"); | 855 "IOThread::Init:ProxyScriptFetcherRequestContext"); |
854 globals_->proxy_script_fetcher_context.reset( | 856 globals_->proxy_script_fetcher_context.reset( |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 params->next_protos = globals.next_protos; | 1132 params->next_protos = globals.next_protos; |
1131 globals.trusted_spdy_proxy.CopyToIfSet(¶ms->trusted_spdy_proxy); | 1133 globals.trusted_spdy_proxy.CopyToIfSet(¶ms->trusted_spdy_proxy); |
1132 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; | 1134 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; |
1133 globals.use_alternative_services.CopyToIfSet( | 1135 globals.use_alternative_services.CopyToIfSet( |
1134 ¶ms->use_alternative_services); | 1136 ¶ms->use_alternative_services); |
1135 globals.alternative_service_probability_threshold.CopyToIfSet( | 1137 globals.alternative_service_probability_threshold.CopyToIfSet( |
1136 ¶ms->alternative_service_probability_threshold); | 1138 ¶ms->alternative_service_probability_threshold); |
1137 | 1139 |
1138 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); | 1140 globals.enable_npn.CopyToIfSet(¶ms->enable_npn); |
1139 | 1141 |
| 1142 globals.enable_brotli.CopyToIfSet(¶ms->enable_brotli); |
| 1143 |
1140 globals.enable_quic.CopyToIfSet(¶ms->enable_quic); | 1144 globals.enable_quic.CopyToIfSet(¶ms->enable_quic); |
1141 globals.enable_quic_for_proxies.CopyToIfSet(¶ms->enable_quic_for_proxies); | 1145 globals.enable_quic_for_proxies.CopyToIfSet(¶ms->enable_quic_for_proxies); |
1142 globals.quic_always_require_handshake_confirmation.CopyToIfSet( | 1146 globals.quic_always_require_handshake_confirmation.CopyToIfSet( |
1143 ¶ms->quic_always_require_handshake_confirmation); | 1147 ¶ms->quic_always_require_handshake_confirmation); |
1144 globals.quic_disable_connection_pooling.CopyToIfSet( | 1148 globals.quic_disable_connection_pooling.CopyToIfSet( |
1145 ¶ms->quic_disable_connection_pooling); | 1149 ¶ms->quic_disable_connection_pooling); |
1146 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet( | 1150 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet( |
1147 ¶ms->quic_load_server_info_timeout_srtt_multiplier); | 1151 ¶ms->quic_load_server_info_timeout_srtt_multiplier); |
1148 globals.quic_enable_connection_racing.CopyToIfSet( | 1152 globals.quic_enable_connection_racing.CopyToIfSet( |
1149 ¶ms->quic_enable_connection_racing); | 1153 ¶ms->quic_enable_connection_racing); |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 1745 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
1742 | 1746 |
1743 context->set_job_factory( | 1747 context->set_job_factory( |
1744 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1748 globals->proxy_script_fetcher_url_request_job_factory.get()); |
1745 | 1749 |
1746 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1750 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1747 // system URLRequestContext too. There's no reason this should be tied to a | 1751 // system URLRequestContext too. There's no reason this should be tied to a |
1748 // profile. | 1752 // profile. |
1749 return context; | 1753 return context; |
1750 } | 1754 } |
OLD | NEW |