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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int quic_max_number_of_lossy_connections; | 100 int quic_max_number_of_lossy_connections; |
101 std::unordered_set<std::string> quic_host_whitelist; | 101 std::unordered_set<std::string> quic_host_whitelist; |
102 bool quic_prefer_aes; | 102 bool quic_prefer_aes; |
103 float quic_packet_loss_threshold; | 103 float quic_packet_loss_threshold; |
104 int quic_idle_connection_timeout_seconds; | 104 int quic_idle_connection_timeout_seconds; |
105 QuicTagVector quic_connection_options; | 105 QuicTagVector quic_connection_options; |
106 bool quic_close_sessions_on_ip_change; | 106 bool quic_close_sessions_on_ip_change; |
107 bool quic_migrate_sessions_on_network_change; | 107 bool quic_migrate_sessions_on_network_change; |
108 bool quic_migrate_sessions_early; | 108 bool quic_migrate_sessions_early; |
109 bool quic_disable_bidirectional_streams; | 109 bool quic_disable_bidirectional_streams; |
| 110 bool quic_race_cert_verification; |
110 }; | 111 }; |
111 | 112 |
112 URLRequestContextBuilder(); | 113 URLRequestContextBuilder(); |
113 ~URLRequestContextBuilder(); | 114 ~URLRequestContextBuilder(); |
114 | 115 |
115 // Extracts the component pointers required to construct an HttpNetworkSession | 116 // Extracts the component pointers required to construct an HttpNetworkSession |
116 // and copies them into the Params used to create the session. This function | 117 // and copies them into the Params used to create the session. This function |
117 // should be used to ensure that a context and its associated | 118 // should be used to ensure that a context and its associated |
118 // HttpNetworkSession are consistent. | 119 // HttpNetworkSession are consistent. |
119 static void SetHttpNetworkSessionComponents( | 120 static void SetHttpNetworkSessionComponents( |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 http_network_session_params_.quic_migrate_sessions_early = | 279 http_network_session_params_.quic_migrate_sessions_early = |
279 quic_migrate_sessions_early; | 280 quic_migrate_sessions_early; |
280 } | 281 } |
281 | 282 |
282 void set_quic_disable_bidirectional_streams( | 283 void set_quic_disable_bidirectional_streams( |
283 bool quic_disable_bidirectional_streams) { | 284 bool quic_disable_bidirectional_streams) { |
284 http_network_session_params_.quic_disable_bidirectional_streams = | 285 http_network_session_params_.quic_disable_bidirectional_streams = |
285 quic_disable_bidirectional_streams; | 286 quic_disable_bidirectional_streams; |
286 } | 287 } |
287 | 288 |
| 289 void set_quic_race_cert_verification(bool quic_race_cert_verification) { |
| 290 http_network_session_params_.quic_race_cert_verification = |
| 291 quic_race_cert_verification; |
| 292 } |
| 293 |
288 void set_throttling_enabled(bool throttling_enabled) { | 294 void set_throttling_enabled(bool throttling_enabled) { |
289 throttling_enabled_ = throttling_enabled; | 295 throttling_enabled_ = throttling_enabled; |
290 } | 296 } |
291 | 297 |
292 void set_backoff_enabled(bool backoff_enabled) { | 298 void set_backoff_enabled(bool backoff_enabled) { |
293 backoff_enabled_ = backoff_enabled; | 299 backoff_enabled_ = backoff_enabled; |
294 } | 300 } |
295 | 301 |
296 void set_socket_performance_watcher_factory( | 302 void set_socket_performance_watcher_factory( |
297 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { | 303 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 // Not owned by the context builder. Once it is set to a non-null value, it | 385 // Not owned by the context builder. Once it is set to a non-null value, it |
380 // is guaranteed to be non-null during the lifetime of |this|. | 386 // is guaranteed to be non-null during the lifetime of |this|. |
381 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; | 387 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |
382 | 388 |
383 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 389 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
384 }; | 390 }; |
385 | 391 |
386 } // namespace net | 392 } // namespace net |
387 | 393 |
388 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 394 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |