| 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 // This class is useful for building a simple URLRequestContext. Most creators | 5 // This class is useful for building a simple URLRequestContext. Most creators |
| 6 // of new URLRequestContexts should use this helper class to construct it. Call | 6 // of new URLRequestContexts should use this helper class to construct it. Call |
| 7 // any configuration params, and when done, invoke Build() to construct the | 7 // any configuration params, and when done, invoke Build() to construct the |
| 8 // URLRequestContext. This URLRequestContext will own all its own storage. | 8 // URLRequestContext. This URLRequestContext will own all its own storage. |
| 9 // | 9 // |
| 10 // URLRequestContextBuilder and its associated params classes are initially | 10 // URLRequestContextBuilder and its associated params classes are initially |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // These fields mirror those in HttpNetworkSession::Params; | 82 // These fields mirror those in HttpNetworkSession::Params; |
| 83 bool ignore_certificate_errors; | 83 bool ignore_certificate_errors; |
| 84 HostMappingRules* host_mapping_rules; | 84 HostMappingRules* host_mapping_rules; |
| 85 uint16_t testing_fixed_http_port; | 85 uint16_t testing_fixed_http_port; |
| 86 uint16_t testing_fixed_https_port; | 86 uint16_t testing_fixed_https_port; |
| 87 NextProtoVector next_protos; | 87 NextProtoVector next_protos; |
| 88 std::string trusted_spdy_proxy; | 88 std::string trusted_spdy_proxy; |
| 89 bool use_alternative_services; | 89 bool use_alternative_services; |
| 90 bool enable_quic; | 90 bool enable_quic; |
| 91 bool quic_store_server_configs_in_properties; | 91 int quic_max_server_configs_stored_in_properties; |
| 92 bool quic_delay_tcp_race; | 92 bool quic_delay_tcp_race; |
| 93 int quic_max_number_of_lossy_connections; | 93 int quic_max_number_of_lossy_connections; |
| 94 std::unordered_set<std::string> quic_host_whitelist; | 94 std::unordered_set<std::string> quic_host_whitelist; |
| 95 float quic_packet_loss_threshold; | 95 float quic_packet_loss_threshold; |
| 96 int quic_idle_connection_timeout_seconds; | 96 int quic_idle_connection_timeout_seconds; |
| 97 QuicTagVector quic_connection_options; | 97 QuicTagVector quic_connection_options; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 URLRequestContextBuilder(); | 100 URLRequestContextBuilder(); |
| 101 ~URLRequestContextBuilder(); | 101 ~URLRequestContextBuilder(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. | 191 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. |
| 192 void SetSpdyAndQuicEnabled(bool spdy_enabled, | 192 void SetSpdyAndQuicEnabled(bool spdy_enabled, |
| 193 bool quic_enabled); | 193 bool quic_enabled); |
| 194 | 194 |
| 195 void set_quic_connection_options( | 195 void set_quic_connection_options( |
| 196 const QuicTagVector& quic_connection_options) { | 196 const QuicTagVector& quic_connection_options) { |
| 197 http_network_session_params_.quic_connection_options = | 197 http_network_session_params_.quic_connection_options = |
| 198 quic_connection_options; | 198 quic_connection_options; |
| 199 } | 199 } |
| 200 | 200 |
| 201 void set_quic_store_server_configs_in_properties( | 201 void set_quic_max_server_configs_stored_in_properties( |
| 202 bool quic_store_server_configs_in_properties) { | 202 int quic_max_server_configs_stored_in_properties) { |
| 203 http_network_session_params_.quic_store_server_configs_in_properties = | 203 http_network_session_params_.quic_max_server_configs_stored_in_properties = |
| 204 quic_store_server_configs_in_properties; | 204 quic_max_server_configs_stored_in_properties; |
| 205 } | 205 } |
| 206 | 206 |
| 207 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { | 207 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { |
| 208 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; | 208 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; |
| 209 } | 209 } |
| 210 | 210 |
| 211 void set_quic_max_number_of_lossy_connections( | 211 void set_quic_max_number_of_lossy_connections( |
| 212 int quic_max_number_of_lossy_connections) { | 212 int quic_max_number_of_lossy_connections) { |
| 213 http_network_session_params_.quic_max_number_of_lossy_connections = | 213 http_network_session_params_.quic_max_number_of_lossy_connections = |
| 214 quic_max_number_of_lossy_connections; | 214 quic_max_number_of_lossy_connections; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 scoped_ptr<CertVerifier> cert_verifier_; | 307 scoped_ptr<CertVerifier> cert_verifier_; |
| 308 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; | 308 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; |
| 309 scoped_ptr<HttpServerProperties> http_server_properties_; | 309 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 310 | 310 |
| 311 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 311 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 312 }; | 312 }; |
| 313 | 313 |
| 314 } // namespace net | 314 } // namespace net |
| 315 | 315 |
| 316 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 316 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |