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

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: Document QUIC UAID string usage, don't pass it down unless QUIC is enabled. 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // These fields mirror those in HttpNetworkSession::Params; 82 // These fields mirror those in HttpNetworkSession::Params;
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 bool parse_alternative_services; 89 bool parse_alternative_services;
90 bool enable_alternative_service_with_different_host; 90 bool enable_alternative_service_with_different_host;
91 bool enable_quic; 91 bool enable_quic;
92 std::string quic_user_agent_id;
92 int quic_max_server_configs_stored_in_properties; 93 int quic_max_server_configs_stored_in_properties;
93 bool quic_delay_tcp_race; 94 bool quic_delay_tcp_race;
94 int quic_max_number_of_lossy_connections; 95 int quic_max_number_of_lossy_connections;
95 std::unordered_set<std::string> quic_host_whitelist; 96 std::unordered_set<std::string> quic_host_whitelist;
97 bool quic_prefer_aes;
96 float quic_packet_loss_threshold; 98 float quic_packet_loss_threshold;
97 int quic_idle_connection_timeout_seconds; 99 int quic_idle_connection_timeout_seconds;
98 QuicTagVector quic_connection_options; 100 QuicTagVector quic_connection_options;
99 bool quic_close_sessions_on_ip_change; 101 bool quic_close_sessions_on_ip_change;
100 bool quic_migrate_sessions_on_network_change; 102 bool quic_migrate_sessions_on_network_change;
101 }; 103 };
102 104
103 URLRequestContextBuilder(); 105 URLRequestContextBuilder();
104 ~URLRequestContextBuilder(); 106 ~URLRequestContextBuilder();
105 107
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 195
194 void SetSpdyAndQuicEnabled(bool spdy_enabled, 196 void SetSpdyAndQuicEnabled(bool spdy_enabled,
195 bool quic_enabled); 197 bool quic_enabled);
196 198
197 void set_quic_connection_options( 199 void set_quic_connection_options(
198 const QuicTagVector& quic_connection_options) { 200 const QuicTagVector& quic_connection_options) {
199 http_network_session_params_.quic_connection_options = 201 http_network_session_params_.quic_connection_options =
200 quic_connection_options; 202 quic_connection_options;
201 } 203 }
202 204
205 void set_quic_user_agent_id(const std::string& quic_user_agent_id) {
206 http_network_session_params_.quic_user_agent_id = quic_user_agent_id;
207 }
208
203 void set_quic_max_server_configs_stored_in_properties( 209 void set_quic_max_server_configs_stored_in_properties(
204 int quic_max_server_configs_stored_in_properties) { 210 int quic_max_server_configs_stored_in_properties) {
205 http_network_session_params_.quic_max_server_configs_stored_in_properties = 211 http_network_session_params_.quic_max_server_configs_stored_in_properties =
206 quic_max_server_configs_stored_in_properties; 212 quic_max_server_configs_stored_in_properties;
207 } 213 }
208 214
209 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { 215 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) {
210 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; 216 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race;
211 } 217 }
212 218
(...skipping 24 matching lines...) Expand all
237 http_network_session_params_.quic_close_sessions_on_ip_change = 243 http_network_session_params_.quic_close_sessions_on_ip_change =
238 quic_close_sessions_on_ip_change; 244 quic_close_sessions_on_ip_change;
239 } 245 }
240 246
241 void set_quic_migrate_sessions_on_network_change( 247 void set_quic_migrate_sessions_on_network_change(
242 bool quic_migrate_sessions_on_network_change) { 248 bool quic_migrate_sessions_on_network_change) {
243 http_network_session_params_.quic_migrate_sessions_on_network_change = 249 http_network_session_params_.quic_migrate_sessions_on_network_change =
244 quic_migrate_sessions_on_network_change; 250 quic_migrate_sessions_on_network_change;
245 } 251 }
246 252
253 void set_quic_prefer_aes(bool quic_prefer_aes) {
254 http_network_session_params_.quic_prefer_aes = quic_prefer_aes;
255 }
256
247 void set_throttling_enabled(bool throttling_enabled) { 257 void set_throttling_enabled(bool throttling_enabled) {
248 throttling_enabled_ = throttling_enabled; 258 throttling_enabled_ = throttling_enabled;
249 } 259 }
250 260
251 void set_backoff_enabled(bool backoff_enabled) { 261 void set_backoff_enabled(bool backoff_enabled) {
252 backoff_enabled_ = backoff_enabled; 262 backoff_enabled_ = backoff_enabled;
253 } 263 }
254 264
255 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); 265 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier);
256 266
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 scoped_ptr<CertVerifier> cert_verifier_; 331 scoped_ptr<CertVerifier> cert_verifier_;
322 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; 332 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
323 scoped_ptr<HttpServerProperties> http_server_properties_; 333 scoped_ptr<HttpServerProperties> http_server_properties_;
324 334
325 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 335 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
326 }; 336 };
327 337
328 } // namespace net 338 } // namespace net
329 339
330 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 340 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config_unittest.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698