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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 243 } |
244 | 244 |
245 void set_transport_security_persister_path( | 245 void set_transport_security_persister_path( |
246 const base::FilePath& transport_security_persister_path) { | 246 const base::FilePath& transport_security_persister_path) { |
247 transport_security_persister_path_ = transport_security_persister_path; | 247 transport_security_persister_path_ = transport_security_persister_path; |
248 } | 248 } |
249 | 249 |
250 void SetSpdyAndQuicEnabled(bool spdy_enabled, | 250 void SetSpdyAndQuicEnabled(bool spdy_enabled, |
251 bool quic_enabled); | 251 bool quic_enabled); |
252 | 252 |
253 void set_quic_connection_options( | |
254 const QuicTagVector& quic_connection_options) { | |
255 http_network_session_params_.quic_connection_options = | |
256 quic_connection_options; | |
257 } | |
258 | |
259 void set_quic_user_agent_id(const std::string& quic_user_agent_id) { | |
260 http_network_session_params_.quic_user_agent_id = quic_user_agent_id; | |
261 } | |
262 | |
263 void set_quic_max_server_configs_stored_in_properties( | |
264 int quic_max_server_configs_stored_in_properties) { | |
265 http_network_session_params_.quic_max_server_configs_stored_in_properties = | |
266 quic_max_server_configs_stored_in_properties; | |
267 } | |
268 | |
269 void set_quic_idle_connection_timeout_seconds( | |
270 int quic_idle_connection_timeout_seconds) { | |
271 http_network_session_params_.quic_idle_connection_timeout_seconds = | |
272 quic_idle_connection_timeout_seconds; | |
273 } | |
274 | |
275 void set_quic_close_sessions_on_ip_change( | |
276 bool quic_close_sessions_on_ip_change) { | |
277 http_network_session_params_.quic_close_sessions_on_ip_change = | |
278 quic_close_sessions_on_ip_change; | |
279 } | |
280 | |
281 void set_quic_migrate_sessions_on_network_change( | |
282 bool quic_migrate_sessions_on_network_change) { | |
283 http_network_session_params_.quic_migrate_sessions_on_network_change = | |
284 quic_migrate_sessions_on_network_change; | |
285 } | |
286 | |
287 void set_quic_migrate_sessions_early(bool quic_migrate_sessions_early) { | |
288 http_network_session_params_.quic_migrate_sessions_early = | |
289 quic_migrate_sessions_early; | |
290 } | |
291 | |
292 void set_quic_disable_bidirectional_streams( | |
293 bool quic_disable_bidirectional_streams) { | |
294 http_network_session_params_.quic_disable_bidirectional_streams = | |
295 quic_disable_bidirectional_streams; | |
296 } | |
297 | |
298 void set_quic_race_cert_verification(bool quic_race_cert_verification) { | |
299 http_network_session_params_.quic_race_cert_verification = | |
300 quic_race_cert_verification; | |
301 } | |
302 | |
303 void set_throttling_enabled(bool throttling_enabled) { | 253 void set_throttling_enabled(bool throttling_enabled) { |
304 throttling_enabled_ = throttling_enabled; | 254 throttling_enabled_ = throttling_enabled; |
305 } | 255 } |
306 | 256 |
307 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); | 257 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); |
308 | 258 |
309 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); | 259 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); |
310 | 260 |
311 #if BUILDFLAG(ENABLE_REPORTING) | 261 #if BUILDFLAG(ENABLE_REPORTING) |
312 void set_reporting_policy( | 262 void set_reporting_policy( |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 std::unique_ptr<HttpServerProperties> http_server_properties_; | 369 std::unique_ptr<HttpServerProperties> http_server_properties_; |
420 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> | 370 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> |
421 protocol_handlers_; | 371 protocol_handlers_; |
422 | 372 |
423 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 373 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
424 }; | 374 }; |
425 | 375 |
426 } // namespace net | 376 } // namespace net |
427 | 377 |
428 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 378 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |