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

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

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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> 17 #include <stdint.h>
18 #include <string> 18 #include <string>
19 #include <utility> 19 #include <utility>
20 20
21 #include "base/files/file_path.h" 21 #include "base/files/file_path.h"
22 #include "base/macros.h" 22 #include "base/macros.h"
23 #include "base/memory/ref_counted.h" 23 #include "base/memory/ref_counted.h"
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "base/memory/weak_ptr.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
26 #include "net/base/net_export.h" 27 #include "net/base/net_export.h"
27 #include "net/base/network_delegate.h" 28 #include "net/base/network_delegate.h"
28 #include "net/dns/host_resolver.h" 29 #include "net/dns/host_resolver.h"
29 #include "net/http/http_network_session.h" 30 #include "net/http/http_network_session.h"
30 #include "net/proxy/proxy_config_service.h" 31 #include "net/proxy/proxy_config_service.h"
31 #include "net/proxy/proxy_service.h" 32 #include "net/proxy/proxy_service.h"
32 #include "net/quic/quic_protocol.h" 33 #include "net/quic/quic_protocol.h"
33 #include "net/socket/next_proto.h" 34 #include "net/socket/next_proto.h"
34 35
35 namespace base { 36 namespace base {
36 class SingleThreadTaskRunner; 37 class SingleThreadTaskRunner;
37 } 38 }
38 39
39 namespace net { 40 namespace net {
40 41
41 class ChannelIDService; 42 class ChannelIDService;
42 class CookieStore; 43 class CookieStore;
43 class FtpTransactionFactory; 44 class FtpTransactionFactory;
44 class HostMappingRules; 45 class HostMappingRules;
45 class HttpAuthHandlerFactory; 46 class HttpAuthHandlerFactory;
46 class HttpServerProperties; 47 class HttpServerProperties;
47 class ProxyConfigService; 48 class ProxyConfigService;
48 class URLRequestContext; 49 class URLRequestContext;
49 class URLRequestInterceptor; 50 class URLRequestInterceptor;
51 class TrustedSpdyProxyProvider;
50 52
51 class NET_EXPORT URLRequestContextBuilder { 53 class NET_EXPORT URLRequestContextBuilder {
52 public: 54 public:
53 struct NET_EXPORT HttpCacheParams { 55 struct NET_EXPORT HttpCacheParams {
54 enum Type { 56 enum Type {
55 // In-memory cache. 57 // In-memory cache.
56 IN_MEMORY, 58 IN_MEMORY,
57 // Disk cache using "default" backend. 59 // Disk cache using "default" backend.
58 DISK, 60 DISK,
59 // Disk cache using "simple" backend (SimpleBackendImpl). 61 // Disk cache using "simple" backend (SimpleBackendImpl).
(...skipping 17 matching lines...) Expand all
77 struct NET_EXPORT HttpNetworkSessionParams { 79 struct NET_EXPORT HttpNetworkSessionParams {
78 HttpNetworkSessionParams(); 80 HttpNetworkSessionParams();
79 ~HttpNetworkSessionParams(); 81 ~HttpNetworkSessionParams();
80 82
81 // These fields mirror those in HttpNetworkSession::Params; 83 // These fields mirror those in HttpNetworkSession::Params;
82 bool ignore_certificate_errors; 84 bool ignore_certificate_errors;
83 HostMappingRules* host_mapping_rules; 85 HostMappingRules* host_mapping_rules;
84 uint16_t testing_fixed_http_port; 86 uint16_t testing_fixed_http_port;
85 uint16_t testing_fixed_https_port; 87 uint16_t testing_fixed_https_port;
86 NextProtoVector next_protos; 88 NextProtoVector next_protos;
87 std::string trusted_spdy_proxy; 89 base::WeakPtr<TrustedSpdyProxyProvider> trusted_spdy_proxy_provider;
88 bool use_alternative_services; 90 bool use_alternative_services;
89 bool enable_quic; 91 bool enable_quic;
90 bool quic_store_server_configs_in_properties; 92 bool quic_store_server_configs_in_properties;
91 bool quic_delay_tcp_race; 93 bool quic_delay_tcp_race;
92 int quic_max_number_of_lossy_connections; 94 int quic_max_number_of_lossy_connections;
93 float quic_packet_loss_threshold; 95 float quic_packet_loss_threshold;
94 int quic_idle_connection_timeout_seconds; 96 int quic_idle_connection_timeout_seconds;
95 QuicTagVector quic_connection_options; 97 QuicTagVector quic_connection_options;
96 }; 98 };
97 99
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 scoped_ptr<CertVerifier> cert_verifier_; 302 scoped_ptr<CertVerifier> cert_verifier_;
301 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; 303 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
302 scoped_ptr<HttpServerProperties> http_server_properties_; 304 scoped_ptr<HttpServerProperties> http_server_properties_;
303 305
304 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 306 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
305 }; 307 };
306 308
307 } // namespace net 309 } // namespace net
308 310
309 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 311 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698