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

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

Issue 1665503002: [Cronet] Expose quic_user_agent_id and quic_prefer_aes config options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 10 months 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool enable_spdy31; 87 bool enable_spdy31;
88 bool enable_http2; 88 bool enable_http2;
89 std::string trusted_spdy_proxy; 89 std::string trusted_spdy_proxy;
90 bool parse_alternative_services; 90 bool parse_alternative_services;
91 bool enable_alternative_service_with_different_host; 91 bool enable_alternative_service_with_different_host;
92 bool enable_quic; 92 bool enable_quic;
93 std::string quic_user_agent_id;
93 int quic_max_server_configs_stored_in_properties; 94 int quic_max_server_configs_stored_in_properties;
94 bool quic_delay_tcp_race; 95 bool quic_delay_tcp_race;
95 int quic_max_number_of_lossy_connections; 96 int quic_max_number_of_lossy_connections;
96 std::unordered_set<std::string> quic_host_whitelist; 97 std::unordered_set<std::string> quic_host_whitelist;
98 bool quic_prefer_aes;
97 float quic_packet_loss_threshold; 99 float quic_packet_loss_threshold;
98 int quic_idle_connection_timeout_seconds; 100 int quic_idle_connection_timeout_seconds;
99 QuicTagVector quic_connection_options; 101 QuicTagVector quic_connection_options;
100 }; 102 };
101 103
102 URLRequestContextBuilder(); 104 URLRequestContextBuilder();
103 ~URLRequestContextBuilder(); 105 ~URLRequestContextBuilder();
104 106
105 // Extracts the component pointers required to construct an HttpNetworkSession 107 // Extracts the component pointers required to construct an HttpNetworkSession
106 // and copies them into the Params used to create the session. This function 108 // and copies them into the Params used to create the session. This function
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 194
193 void SetSpdyAndQuicEnabled(bool spdy_enabled, 195 void SetSpdyAndQuicEnabled(bool spdy_enabled,
194 bool quic_enabled); 196 bool quic_enabled);
195 197
196 void set_quic_connection_options( 198 void set_quic_connection_options(
197 const QuicTagVector& quic_connection_options) { 199 const QuicTagVector& quic_connection_options) {
198 http_network_session_params_.quic_connection_options = 200 http_network_session_params_.quic_connection_options =
199 quic_connection_options; 201 quic_connection_options;
200 } 202 }
201 203
204 void set_quic_user_agent_id(const std::string& quic_user_agent_id) {
205 http_network_session_params_.quic_user_agent_id = quic_user_agent_id;
206 }
207
202 void set_quic_max_server_configs_stored_in_properties( 208 void set_quic_max_server_configs_stored_in_properties(
203 int quic_max_server_configs_stored_in_properties) { 209 int quic_max_server_configs_stored_in_properties) {
204 http_network_session_params_.quic_max_server_configs_stored_in_properties = 210 http_network_session_params_.quic_max_server_configs_stored_in_properties =
205 quic_max_server_configs_stored_in_properties; 211 quic_max_server_configs_stored_in_properties;
206 } 212 }
207 213
208 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { 214 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) {
209 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; 215 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race;
210 } 216 }
211 217
(...skipping 12 matching lines...) Expand all
224 int quic_idle_connection_timeout_seconds) { 230 int quic_idle_connection_timeout_seconds) {
225 http_network_session_params_.quic_idle_connection_timeout_seconds = 231 http_network_session_params_.quic_idle_connection_timeout_seconds =
226 quic_idle_connection_timeout_seconds; 232 quic_idle_connection_timeout_seconds;
227 } 233 }
228 234
229 void set_quic_host_whitelist( 235 void set_quic_host_whitelist(
230 const std::unordered_set<std::string>& quic_host_whitelist) { 236 const std::unordered_set<std::string>& quic_host_whitelist) {
231 http_network_session_params_.quic_host_whitelist = quic_host_whitelist; 237 http_network_session_params_.quic_host_whitelist = quic_host_whitelist;
232 } 238 }
233 239
240 void set_quic_prefer_aes(bool quic_prefer_aes) {
241 http_network_session_params_.quic_prefer_aes = quic_prefer_aes;
242 }
243
234 void set_throttling_enabled(bool throttling_enabled) { 244 void set_throttling_enabled(bool throttling_enabled) {
235 throttling_enabled_ = throttling_enabled; 245 throttling_enabled_ = throttling_enabled;
236 } 246 }
237 247
238 void set_backoff_enabled(bool backoff_enabled) { 248 void set_backoff_enabled(bool backoff_enabled) {
239 backoff_enabled_ = backoff_enabled; 249 backoff_enabled_ = backoff_enabled;
240 } 250 }
241 251
242 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); 252 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier);
243 253
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 scoped_ptr<CertVerifier> cert_verifier_; 318 scoped_ptr<CertVerifier> cert_verifier_;
309 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; 319 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
310 scoped_ptr<HttpServerProperties> http_server_properties_; 320 scoped_ptr<HttpServerProperties> http_server_properties_;
311 321
312 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 322 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
313 }; 323 };
314 324
315 } // namespace net 325 } // namespace net
316 326
317 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 327 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698