| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool quic_delay_tcp_race; | 98 bool quic_delay_tcp_race; |
| 99 int quic_max_number_of_lossy_connections; | 99 int quic_max_number_of_lossy_connections; |
| 100 std::unordered_set<std::string> quic_host_whitelist; | 100 std::unordered_set<std::string> quic_host_whitelist; |
| 101 bool quic_prefer_aes; | 101 bool quic_prefer_aes; |
| 102 float quic_packet_loss_threshold; | 102 float quic_packet_loss_threshold; |
| 103 int quic_idle_connection_timeout_seconds; | 103 int quic_idle_connection_timeout_seconds; |
| 104 QuicTagVector quic_connection_options; | 104 QuicTagVector quic_connection_options; |
| 105 bool quic_close_sessions_on_ip_change; | 105 bool quic_close_sessions_on_ip_change; |
| 106 bool quic_migrate_sessions_on_network_change; | 106 bool quic_migrate_sessions_on_network_change; |
| 107 bool quic_migrate_sessions_early; | 107 bool quic_migrate_sessions_early; |
| 108 bool quic_disable_bidirectional_streams; |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 URLRequestContextBuilder(); | 111 URLRequestContextBuilder(); |
| 111 ~URLRequestContextBuilder(); | 112 ~URLRequestContextBuilder(); |
| 112 | 113 |
| 113 // Extracts the component pointers required to construct an HttpNetworkSession | 114 // Extracts the component pointers required to construct an HttpNetworkSession |
| 114 // and copies them into the Params used to create the session. This function | 115 // and copies them into the Params used to create the session. This function |
| 115 // should be used to ensure that a context and its associated | 116 // should be used to ensure that a context and its associated |
| 116 // HttpNetworkSession are consistent. | 117 // HttpNetworkSession are consistent. |
| 117 static void SetHttpNetworkSessionComponents( | 118 static void SetHttpNetworkSessionComponents( |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 270 |
| 270 void set_quic_prefer_aes(bool quic_prefer_aes) { | 271 void set_quic_prefer_aes(bool quic_prefer_aes) { |
| 271 http_network_session_params_.quic_prefer_aes = quic_prefer_aes; | 272 http_network_session_params_.quic_prefer_aes = quic_prefer_aes; |
| 272 } | 273 } |
| 273 | 274 |
| 274 void set_quic_migrate_sessions_early(bool quic_migrate_sessions_early) { | 275 void set_quic_migrate_sessions_early(bool quic_migrate_sessions_early) { |
| 275 http_network_session_params_.quic_migrate_sessions_early = | 276 http_network_session_params_.quic_migrate_sessions_early = |
| 276 quic_migrate_sessions_early; | 277 quic_migrate_sessions_early; |
| 277 } | 278 } |
| 278 | 279 |
| 280 void set_quic_disable_bidirectional_streams( |
| 281 bool quic_disable_bidirectional_streams) { |
| 282 http_network_session_params_.quic_disable_bidirectional_streams = |
| 283 quic_disable_bidirectional_streams; |
| 284 } |
| 285 |
| 279 void set_throttling_enabled(bool throttling_enabled) { | 286 void set_throttling_enabled(bool throttling_enabled) { |
| 280 throttling_enabled_ = throttling_enabled; | 287 throttling_enabled_ = throttling_enabled; |
| 281 } | 288 } |
| 282 | 289 |
| 283 void set_backoff_enabled(bool backoff_enabled) { | 290 void set_backoff_enabled(bool backoff_enabled) { |
| 284 backoff_enabled_ = backoff_enabled; | 291 backoff_enabled_ = backoff_enabled; |
| 285 } | 292 } |
| 286 | 293 |
| 287 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); | 294 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); |
| 288 | 295 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 scoped_ptr<HttpServerProperties> http_server_properties_; | 363 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 357 std::map<std::string, scoped_ptr<URLRequestJobFactory::ProtocolHandler>> | 364 std::map<std::string, scoped_ptr<URLRequestJobFactory::ProtocolHandler>> |
| 358 protocol_handlers_; | 365 protocol_handlers_; |
| 359 | 366 |
| 360 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 367 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 361 }; | 368 }; |
| 362 | 369 |
| 363 } // namespace net | 370 } // namespace net |
| 364 | 371 |
| 365 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 372 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |