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

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

Issue 1572753003: QUIC - Allow cronet apps to specify how many server configs are to be (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: load all server configs from disk Created 4 years, 11 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 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_t testing_fixed_http_port; 84 uint16_t testing_fixed_http_port;
85 uint16_t testing_fixed_https_port; 85 uint16_t 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; 90 int quic_number_of_server_configs_stored_in_properties;
91 bool quic_delay_tcp_race; 91 bool quic_delay_tcp_race;
92 int quic_max_number_of_lossy_connections; 92 int quic_max_number_of_lossy_connections;
93 float quic_packet_loss_threshold; 93 float quic_packet_loss_threshold;
94 int quic_idle_connection_timeout_seconds; 94 int quic_idle_connection_timeout_seconds;
95 QuicTagVector quic_connection_options; 95 QuicTagVector quic_connection_options;
96 }; 96 };
97 97
98 URLRequestContextBuilder(); 98 URLRequestContextBuilder();
99 ~URLRequestContextBuilder(); 99 ~URLRequestContextBuilder();
100 100
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. 189 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC.
190 void SetSpdyAndQuicEnabled(bool spdy_enabled, 190 void SetSpdyAndQuicEnabled(bool spdy_enabled,
191 bool quic_enabled); 191 bool quic_enabled);
192 192
193 void set_quic_connection_options( 193 void set_quic_connection_options(
194 const QuicTagVector& quic_connection_options) { 194 const QuicTagVector& quic_connection_options) {
195 http_network_session_params_.quic_connection_options = 195 http_network_session_params_.quic_connection_options =
196 quic_connection_options; 196 quic_connection_options;
197 } 197 }
198 198
199 void set_quic_store_server_configs_in_properties( 199 void set_quic_number_of_server_configs_stored_in_properties(
200 bool quic_store_server_configs_in_properties) { 200 int quic_number_of_server_configs_stored_in_properties) {
201 http_network_session_params_.quic_store_server_configs_in_properties = 201 http_network_session_params_
202 quic_store_server_configs_in_properties; 202 .quic_number_of_server_configs_stored_in_properties =
203 quic_number_of_server_configs_stored_in_properties;
203 } 204 }
204 205
205 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { 206 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) {
206 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; 207 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race;
207 } 208 }
208 209
209 void set_quic_max_number_of_lossy_connections( 210 void set_quic_max_number_of_lossy_connections(
210 int quic_max_number_of_lossy_connections) { 211 int quic_max_number_of_lossy_connections) {
211 http_network_session_params_.quic_max_number_of_lossy_connections = 212 http_network_session_params_.quic_max_number_of_lossy_connections =
212 quic_max_number_of_lossy_connections; 213 quic_max_number_of_lossy_connections;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 scoped_ptr<CertVerifier> cert_verifier_; 301 scoped_ptr<CertVerifier> cert_verifier_;
301 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; 302 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
302 scoped_ptr<HttpServerProperties> http_server_properties_; 303 scoped_ptr<HttpServerProperties> http_server_properties_;
303 304
304 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 305 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
305 }; 306 };
306 307
307 } // namespace net 308 } // namespace net
308 309
309 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 310 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698