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

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

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, added more tests Created 5 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // These fields mirror those in net::HttpNetworkSession::Params; 69 // These fields mirror those in net::HttpNetworkSession::Params;
70 bool ignore_certificate_errors; 70 bool ignore_certificate_errors;
71 HostMappingRules* host_mapping_rules; 71 HostMappingRules* host_mapping_rules;
72 uint16 testing_fixed_http_port; 72 uint16 testing_fixed_http_port;
73 uint16 testing_fixed_https_port; 73 uint16 testing_fixed_https_port;
74 NextProtoVector next_protos; 74 NextProtoVector next_protos;
75 std::string trusted_spdy_proxy; 75 std::string trusted_spdy_proxy;
76 bool use_alternate_protocols; 76 bool use_alternate_protocols;
77 bool enable_quic; 77 bool enable_quic;
78 bool enable_quic_for_proxies;
78 QuicTagVector quic_connection_options; 79 QuicTagVector quic_connection_options;
79 }; 80 };
80 81
81 URLRequestContextBuilder(); 82 URLRequestContextBuilder();
82 ~URLRequestContextBuilder(); 83 ~URLRequestContextBuilder();
83 84
84 // These functions are mutually exclusive. The ProxyConfigService, if 85 // These functions are mutually exclusive. The ProxyConfigService, if
85 // set, will be used to construct a ProxyService. 86 // set, will be used to construct a ProxyService.
86 void set_proxy_config_service(ProxyConfigService* proxy_config_service) { 87 void set_proxy_config_service(ProxyConfigService* proxy_config_service) {
87 proxy_config_service_.reset(proxy_config_service); 88 proxy_config_service_.reset(proxy_config_service);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const HttpNetworkSessionParams& http_network_session_params) { 157 const HttpNetworkSessionParams& http_network_session_params) {
157 http_network_session_params_ = http_network_session_params; 158 http_network_session_params_ = http_network_session_params;
158 } 159 }
159 160
160 void set_transport_security_persister_path( 161 void set_transport_security_persister_path(
161 const base::FilePath& transport_security_persister_path) { 162 const base::FilePath& transport_security_persister_path) {
162 transport_security_persister_path_ = transport_security_persister_path; 163 transport_security_persister_path_ = transport_security_persister_path;
163 } 164 }
164 165
165 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. 166 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC.
166 void SetSpdyAndQuicEnabled(bool spdy_enabled, 167 void SetSpdyAndQuicEnabled(bool spdy_enabled,
Ryan Hamilton 2015/02/11 00:20:32 I don't see any changes to the caller of this meth
tbansal1 2015/02/11 01:25:26 Done.
167 bool quic_enabled); 168 bool quic_enabled,
169 bool quic_enabled_for_proxies);
168 170
169 void set_quic_connection_options( 171 void set_quic_connection_options(
170 const QuicTagVector& quic_connection_options) { 172 const QuicTagVector& quic_connection_options) {
171 http_network_session_params_.quic_connection_options = 173 http_network_session_params_.quic_connection_options =
172 quic_connection_options; 174 quic_connection_options;
173 } 175 }
174 176
175 void set_throttling_enabled(bool throttling_enabled) { 177 void set_throttling_enabled(bool throttling_enabled) {
176 throttling_enabled_ = throttling_enabled; 178 throttling_enabled_ = throttling_enabled;
177 } 179 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 scoped_refptr<CookieStore> cookie_store_; 228 scoped_refptr<CookieStore> cookie_store_;
227 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; 229 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
228 std::vector<SchemeFactory> extra_http_auth_handlers_; 230 std::vector<SchemeFactory> extra_http_auth_handlers_;
229 231
230 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 232 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
231 }; 233 };
232 234
233 } // namespace net 235 } // namespace net
234 236
235 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 237 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698