Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: net/url_request/url_request_context_builder.h

Issue 1448583003: [Cronet] Add QUIC experimental params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@experiment_ops
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // These fields mirror those in HttpNetworkSession::Params; 81 // These fields mirror those in HttpNetworkSession::Params;
82 bool ignore_certificate_errors; 82 bool ignore_certificate_errors;
83 HostMappingRules* host_mapping_rules; 83 HostMappingRules* host_mapping_rules;
84 uint16 testing_fixed_http_port; 84 uint16 testing_fixed_http_port;
85 uint16 testing_fixed_https_port; 85 uint16 testing_fixed_https_port;
86 NextProtoVector next_protos; 86 NextProtoVector next_protos;
87 std::string trusted_spdy_proxy; 87 std::string trusted_spdy_proxy;
88 bool use_alternative_services; 88 bool use_alternative_services;
89 bool enable_quic; 89 bool enable_quic;
90 bool quic_store_server_configs_in_properties;
91 bool quic_delay_tcp_race;
90 QuicTagVector quic_connection_options; 92 QuicTagVector quic_connection_options;
91 }; 93 };
92 94
93 URLRequestContextBuilder(); 95 URLRequestContextBuilder();
94 ~URLRequestContextBuilder(); 96 ~URLRequestContextBuilder();
95 97
96 // Extracts the component pointers required to construct an HttpNetworkSession 98 // Extracts the component pointers required to construct an HttpNetworkSession
97 // and copies them into the Params used to create the session. This function 99 // and copies them into the Params used to create the session. This function
98 // should be used to ensure that a context and its associated 100 // should be used to ensure that a context and its associated
99 // HttpNetworkSession are consistent. 101 // HttpNetworkSession are consistent.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. 187 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC.
186 void SetSpdyAndQuicEnabled(bool spdy_enabled, 188 void SetSpdyAndQuicEnabled(bool spdy_enabled,
187 bool quic_enabled); 189 bool quic_enabled);
188 190
189 void set_quic_connection_options( 191 void set_quic_connection_options(
190 const QuicTagVector& quic_connection_options) { 192 const QuicTagVector& quic_connection_options) {
191 http_network_session_params_.quic_connection_options = 193 http_network_session_params_.quic_connection_options =
192 quic_connection_options; 194 quic_connection_options;
193 } 195 }
194 196
197 void set_quic_store_server_configs_in_properties(
198 bool quic_store_server_configs_in_properties) {
199 http_network_session_params_.quic_store_server_configs_in_properties =
200 quic_store_server_configs_in_properties;
201 }
202
203 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) {
204 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race;
205 }
206
195 void set_throttling_enabled(bool throttling_enabled) { 207 void set_throttling_enabled(bool throttling_enabled) {
196 throttling_enabled_ = throttling_enabled; 208 throttling_enabled_ = throttling_enabled;
197 } 209 }
198 210
199 void set_backoff_enabled(bool backoff_enabled) { 211 void set_backoff_enabled(bool backoff_enabled) {
200 backoff_enabled_ = backoff_enabled; 212 backoff_enabled_ = backoff_enabled;
201 } 213 }
202 214
203 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); 215 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier);
204 216
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 scoped_ptr<CertVerifier> cert_verifier_; 289 scoped_ptr<CertVerifier> cert_verifier_;
278 ScopedVector<URLRequestInterceptor> url_request_interceptors_; 290 ScopedVector<URLRequestInterceptor> url_request_interceptors_;
279 scoped_ptr<HttpServerProperties> http_server_properties_; 291 scoped_ptr<HttpServerProperties> http_server_properties_;
280 292
281 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 293 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
282 }; 294 };
283 295
284 } // namespace net 296 } // namespace net
285 297
286 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 298 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698