OLD | NEW |
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 |
11 // populated with "sane" default values. Read through the comments to figure out | 11 // populated with "sane" default values. Read through the comments to figure out |
12 // what these are. | 12 // what these are. |
13 | 13 |
14 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 14 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
15 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 15 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
16 | 16 |
| 17 #include <stdint.h> |
| 18 |
17 #include <string> | 19 #include <string> |
18 | 20 |
19 #include "base/basictypes.h" | |
20 #include "base/files/file_path.h" | 21 #include "base/files/file_path.h" |
| 22 #include "base/macros.h" |
21 #include "base/memory/ref_counted.h" | 23 #include "base/memory/ref_counted.h" |
22 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
23 #include "build/build_config.h" | 25 #include "build/build_config.h" |
24 #include "net/base/net_export.h" | 26 #include "net/base/net_export.h" |
25 #include "net/base/network_delegate.h" | 27 #include "net/base/network_delegate.h" |
26 #include "net/dns/host_resolver.h" | 28 #include "net/dns/host_resolver.h" |
27 #include "net/http/http_network_session.h" | 29 #include "net/http/http_network_session.h" |
28 #include "net/proxy/proxy_config_service.h" | 30 #include "net/proxy/proxy_config_service.h" |
29 #include "net/proxy/proxy_service.h" | 31 #include "net/proxy/proxy_service.h" |
30 #include "net/quic/quic_protocol.h" | 32 #include "net/quic/quic_protocol.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 base::FilePath path; | 74 base::FilePath path; |
73 }; | 75 }; |
74 | 76 |
75 struct NET_EXPORT HttpNetworkSessionParams { | 77 struct NET_EXPORT HttpNetworkSessionParams { |
76 HttpNetworkSessionParams(); | 78 HttpNetworkSessionParams(); |
77 ~HttpNetworkSessionParams(); | 79 ~HttpNetworkSessionParams(); |
78 | 80 |
79 // These fields mirror those in HttpNetworkSession::Params; | 81 // These fields mirror those in HttpNetworkSession::Params; |
80 bool ignore_certificate_errors; | 82 bool ignore_certificate_errors; |
81 HostMappingRules* host_mapping_rules; | 83 HostMappingRules* host_mapping_rules; |
82 uint16 testing_fixed_http_port; | 84 uint16_t testing_fixed_http_port; |
83 uint16 testing_fixed_https_port; | 85 uint16_t testing_fixed_https_port; |
84 NextProtoVector next_protos; | 86 NextProtoVector next_protos; |
85 std::string trusted_spdy_proxy; | 87 std::string trusted_spdy_proxy; |
86 bool use_alternative_services; | 88 bool use_alternative_services; |
87 bool enable_quic; | 89 bool enable_quic; |
88 bool quic_store_server_configs_in_properties; | 90 bool quic_store_server_configs_in_properties; |
89 bool quic_delay_tcp_race; | 91 bool quic_delay_tcp_race; |
90 int quic_max_number_of_lossy_connections; | 92 int quic_max_number_of_lossy_connections; |
91 float quic_packet_loss_threshold; | 93 float quic_packet_loss_threshold; |
92 int quic_idle_connection_timeout_seconds; | 94 int quic_idle_connection_timeout_seconds; |
93 QuicTagVector quic_connection_options; | 95 QuicTagVector quic_connection_options; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 scoped_ptr<CertVerifier> cert_verifier_; | 300 scoped_ptr<CertVerifier> cert_verifier_; |
299 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; | 301 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; |
300 scoped_ptr<HttpServerProperties> http_server_properties_; | 302 scoped_ptr<HttpServerProperties> http_server_properties_; |
301 | 303 |
302 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 304 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
303 }; | 305 }; |
304 | 306 |
305 } // namespace net | 307 } // namespace net |
306 | 308 |
307 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 309 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |