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> | 17 #include <stdint.h> |
18 | 18 |
19 #include <map> | 19 #include <map> |
20 #include <memory> | 20 #include <memory> |
21 #include <string> | 21 #include <string> |
22 #include <unordered_map> | 22 #include <unordered_map> |
23 #include <utility> | 23 #include <utility> |
24 #include <vector> | 24 #include <vector> |
25 | 25 |
| 26 #include "base/callback.h" |
26 #include "base/files/file_path.h" | 27 #include "base/files/file_path.h" |
27 #include "base/macros.h" | 28 #include "base/macros.h" |
28 #include "base/memory/ref_counted.h" | 29 #include "base/memory/ref_counted.h" |
29 #include "base/task_scheduler/task_traits.h" | 30 #include "base/task_scheduler/task_traits.h" |
30 #include "build/build_config.h" | 31 #include "build/build_config.h" |
31 #include "build/buildflag.h" | 32 #include "build/buildflag.h" |
32 #include "net/base/net_export.h" | 33 #include "net/base/net_export.h" |
33 #include "net/base/network_delegate.h" | 34 #include "net/base/network_delegate.h" |
34 #include "net/base/proxy_delegate.h" | 35 #include "net/base/proxy_delegate.h" |
35 #include "net/dns/host_resolver.h" | 36 #include "net/dns/host_resolver.h" |
(...skipping 11 matching lines...) Expand all Loading... |
47 } | 48 } |
48 | 49 |
49 namespace net { | 50 namespace net { |
50 | 51 |
51 class CertVerifier; | 52 class CertVerifier; |
52 class ChannelIDService; | 53 class ChannelIDService; |
53 class CookieStore; | 54 class CookieStore; |
54 class CTPolicyEnforcer; | 55 class CTPolicyEnforcer; |
55 class CTVerifier; | 56 class CTVerifier; |
56 class HttpAuthHandlerFactory; | 57 class HttpAuthHandlerFactory; |
| 58 class HttpUserAgentSettings; |
57 class HttpServerProperties; | 59 class HttpServerProperties; |
58 class NetworkQualityEstimator; | 60 class NetworkQualityEstimator; |
59 class ProxyConfigService; | 61 class ProxyConfigService; |
60 struct ReportingPolicy; | 62 struct ReportingPolicy; |
61 class URLRequestContext; | 63 class URLRequestContext; |
62 class URLRequestInterceptor; | 64 class URLRequestInterceptor; |
63 | 65 |
64 // A URLRequestContextBuilder creates a single URLRequestContext. It provides | 66 // A URLRequestContextBuilder creates a single URLRequestContext. It provides |
65 // methods to manage various URLRequestContext components which should be called | 67 // methods to manage various URLRequestContext components which should be called |
66 // before creating the Context. Once configuration is complete, calling Build() | 68 // before creating the Context. Once configuration is complete, calling Build() |
67 // will create a URLRequestContext with the specified configuration. Components | 69 // will create a URLRequestContext with the specified configuration. Components |
68 // that are not explicitly configured will use reasonable in-memory defaults. | 70 // that are not explicitly configured will use reasonable in-memory defaults. |
69 // | 71 // |
70 // The returned URLRequestContext is self-contained: Deleting it will safely | 72 // The returned URLRequestContext is self-contained: Deleting it will safely |
71 // shut down all of the URLRequests owned by its internal components, and then | 73 // shut down all of the URLRequests owned by its internal components, and then |
72 // tear down those components. The only exception to this are objects not owned | 74 // tear down those components. The only exception to this are objects not owned |
73 // by URLRequestContext. This includes components passed in to the methods that | 75 // by URLRequestContext. This includes components passed in to the methods that |
74 // take raw pointers, and objects that components passed in to the Builder have | 76 // take raw pointers, and objects that components passed in to the Builder have |
75 // raw pointers to. | 77 // raw pointers to. |
76 // | 78 // |
77 // A Builder should be destroyed after calling Build, and there is no need to | 79 // A Builder should be destroyed after calling Build, and there is no need to |
78 // keep it around for the lifetime of the created URLRequestContext. Each | 80 // keep it around for the lifetime of the created URLRequestContext. Each |
79 // Builder may be used to create only a single URLRequestContext. | 81 // Builder may be used to create only a single URLRequestContext. |
80 class NET_EXPORT URLRequestContextBuilder { | 82 class NET_EXPORT URLRequestContextBuilder { |
81 public: | 83 public: |
| 84 using CreateInterceptingJobFactory = |
| 85 base::OnceCallback<std::unique_ptr<net::URLRequestJobFactory>( |
| 86 std::unique_ptr<net::URLRequestJobFactory> inner_job_factory)>; |
| 87 |
82 struct NET_EXPORT HttpCacheParams { | 88 struct NET_EXPORT HttpCacheParams { |
83 enum Type { | 89 enum Type { |
84 // In-memory cache. | 90 // In-memory cache. |
85 IN_MEMORY, | 91 IN_MEMORY, |
86 // Disk cache using "default" backend. | 92 // Disk cache using "default" backend. |
87 DISK, | 93 DISK, |
| 94 // Disk cache using "blockfile" backend (BackendImpl). |
| 95 DISK_BLOCKFILE, |
88 // Disk cache using "simple" backend (SimpleBackendImpl). | 96 // Disk cache using "simple" backend (SimpleBackendImpl). |
89 DISK_SIMPLE, | 97 DISK_SIMPLE, |
90 }; | 98 }; |
91 | 99 |
92 HttpCacheParams(); | 100 HttpCacheParams(); |
93 ~HttpCacheParams(); | 101 ~HttpCacheParams(); |
94 | 102 |
95 // The type of HTTP cache. Default is IN_MEMORY. | 103 // The type of HTTP cache. Default is IN_MEMORY. |
96 Type type; | 104 Type type; |
97 | 105 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 167 } |
160 | 168 |
161 void set_ssl_config_service( | 169 void set_ssl_config_service( |
162 scoped_refptr<net::SSLConfigService> ssl_config_service) { | 170 scoped_refptr<net::SSLConfigService> ssl_config_service) { |
163 ssl_config_service_ = std::move(ssl_config_service); | 171 ssl_config_service_ = std::move(ssl_config_service); |
164 } | 172 } |
165 | 173 |
166 // Call these functions to specify hard-coded Accept-Language | 174 // Call these functions to specify hard-coded Accept-Language |
167 // or User-Agent header values for all requests that don't | 175 // or User-Agent header values for all requests that don't |
168 // have the headers already set. | 176 // have the headers already set. |
169 void set_accept_language(const std::string& accept_language) { | 177 void set_accept_language(const std::string& accept_language); |
170 accept_language_ = accept_language; | 178 void set_user_agent(const std::string& user_agent); |
171 } | 179 // Makes the created URLRequestContext use a shared HttpUserAgentSettings |
172 void set_user_agent(const std::string& user_agent) { | 180 // object. Not compatible with set_accept_language() / set_user_agent(). The |
173 user_agent_ = user_agent; | 181 // consumer must ensure the HttpUserAgentSettings outlives the |
174 } | 182 // URLRequestContext returned by the builder. |
| 183 // |
| 184 // TODO(mmenke): Take ownership of the object instead. See: |
| 185 // https://crbug.com/743251 |
| 186 void set_shared_http_user_agent_settings( |
| 187 HttpUserAgentSettings* shared_http_user_agent_settings); |
175 | 188 |
176 // Control support for data:// requests. By default it's disabled. | 189 // Control support for data:// requests. By default it's disabled. |
177 void set_data_enabled(bool enable) { | 190 void set_data_enabled(bool enable) { |
178 data_enabled_ = enable; | 191 data_enabled_ = enable; |
179 } | 192 } |
180 | 193 |
181 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) | 194 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) |
182 // Control support for file:// requests. By default it's disabled. | 195 // Control support for file:// requests. By default it's disabled. |
183 void set_file_enabled(bool enable) { | 196 void set_file_enabled(bool enable) { |
184 file_enabled_ = enable; | 197 file_enabled_ = enable; |
(...skipping 13 matching lines...) Expand all Loading... |
198 const std::string& scheme, | 211 const std::string& scheme, |
199 std::unique_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler); | 212 std::unique_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler); |
200 | 213 |
201 // Unlike the other setters, the builder does not take ownership of the | 214 // Unlike the other setters, the builder does not take ownership of the |
202 // NetLog. | 215 // NetLog. |
203 // TODO(mmenke): Probably makes sense to get rid of this, and have consumers | 216 // TODO(mmenke): Probably makes sense to get rid of this, and have consumers |
204 // set their own NetLog::Observers instead. | 217 // set their own NetLog::Observers instead. |
205 void set_net_log(NetLog* net_log) { net_log_ = net_log; } | 218 void set_net_log(NetLog* net_log) { net_log_ = net_log; } |
206 | 219 |
207 // By default host_resolver is constructed with CreateDefaultResolver. | 220 // By default host_resolver is constructed with CreateDefaultResolver. |
208 void set_host_resolver(std::unique_ptr<HostResolver> host_resolver) { | 221 void set_host_resolver(std::unique_ptr<HostResolver> host_resolver); |
209 host_resolver_ = std::move(host_resolver); | 222 // Allows sharing the HostResolver with other URLRequestContexts. Should not |
210 } | 223 // be used if set_host_resolver() is used. The consumer must ensure the |
| 224 // HostResolver outlives the URLRequestContext returned by the builder. |
| 225 // |
| 226 // TODO(mmenke): Figure out the cost/benefits of not supporting sharing |
| 227 // HostResolvers between URLRequestContexts. See: https://crbug.com/743251. |
| 228 void set_shared_host_resolver(HostResolver* host_resolver); |
211 | 229 |
212 // Uses BasicNetworkDelegate by default. Note that calling Build will unset | 230 // Uses BasicNetworkDelegate by default. Note that calling Build will unset |
213 // any custom delegate in builder, so this must be called each time before | 231 // any custom delegate in builder, so this must be called each time before |
214 // Build is called. | 232 // Build is called. |
215 void set_network_delegate(std::unique_ptr<NetworkDelegate> delegate) { | 233 void set_network_delegate(std::unique_ptr<NetworkDelegate> delegate) { |
216 network_delegate_ = std::move(delegate); | 234 network_delegate_ = std::move(delegate); |
217 } | 235 } |
218 | 236 |
219 // Temporarily stores a ProxyDelegate. Ownership is transferred to | 237 // Sets the ProxyDelegate. |
220 // UrlRequestContextStorage during Build. | 238 void set_proxy_delegate(std::unique_ptr<ProxyDelegate> proxy_delegate); |
221 void set_proxy_delegate(std::unique_ptr<ProxyDelegate> delegate) { | 239 // Allows sharing the PreoxyDelegates with other URLRequestContexts. Should |
222 proxy_delegate_ = std::move(delegate); | 240 // not be used if set_proxy_delegate() is used. The consumer must ensure the |
223 } | 241 // ProxyDelegate outlives the URLRequestContext returned by the builder. |
| 242 // |
| 243 // TODO(mmenke): Remove this (And update consumers). See: |
| 244 // https://crbug.com/743251. |
| 245 void set_shared_proxy_delegate(ProxyDelegate* shared_proxy_delegate); |
224 | 246 |
225 // Sets a specific HttpAuthHandlerFactory to be used by the URLRequestContext | 247 // Sets a specific HttpAuthHandlerFactory to be used by the URLRequestContext |
226 // rather than the default |HttpAuthHandlerRegistryFactory|. The builder | 248 // rather than the default |HttpAuthHandlerRegistryFactory|. The builder |
227 // takes ownership of the factory and will eventually transfer it to the new | 249 // takes ownership of the factory and will eventually transfer it to the new |
228 // URLRequestContext. Note that since Build will transfer ownership, the | 250 // URLRequestContext. |
229 // custom factory will be unset and this must be called before the next Build | |
230 // to set another custom one. | |
231 void SetHttpAuthHandlerFactory( | 251 void SetHttpAuthHandlerFactory( |
232 std::unique_ptr<HttpAuthHandlerFactory> factory); | 252 std::unique_ptr<HttpAuthHandlerFactory> factory); |
| 253 // Makes the created URLRequestContext use a shared HttpAuthHandlerFactory |
| 254 // object. Not compatible with SetHttpAuthHandlerFactory(). The consumer must |
| 255 // ensure the HttpAuthHandlerFactory outlives the URLRequestContext returned |
| 256 // by the builder. |
| 257 // |
| 258 // TODO(mmenke): Evaluate if sharing is really needed. See: |
| 259 // https://crbug.com/743251. |
| 260 void set_shared_http_auth_handler_factory( |
| 261 HttpAuthHandlerFactory* shared_http_auth_handler_factory); |
233 | 262 |
234 // By default HttpCache is enabled with a default constructed HttpCacheParams. | 263 // By default HttpCache is enabled with a default constructed HttpCacheParams. |
235 void EnableHttpCache(const HttpCacheParams& params); | 264 void EnableHttpCache(const HttpCacheParams& params); |
236 void DisableHttpCache(); | 265 void DisableHttpCache(); |
237 | 266 |
238 // Override default HttpNetworkSession::Params settings. | 267 // Override default HttpNetworkSession::Params settings. |
239 void set_http_network_session_params( | 268 void set_http_network_session_params( |
240 const HttpNetworkSession::Params& http_network_session_params) { | 269 const HttpNetworkSession::Params& http_network_session_params) { |
241 http_network_session_params_ = http_network_session_params; | 270 http_network_session_params_ = http_network_session_params; |
242 } | 271 } |
243 | 272 |
244 void set_transport_security_persister_path( | 273 void set_transport_security_persister_path( |
245 const base::FilePath& transport_security_persister_path) { | 274 const base::FilePath& transport_security_persister_path) { |
246 transport_security_persister_path_ = transport_security_persister_path; | 275 transport_security_persister_path_ = transport_security_persister_path; |
247 } | 276 } |
248 | 277 |
| 278 // Sets whether the TransportSecurityPersister only reads persisted |
| 279 // information, or also writes it. By default, it both reads and writes. |
| 280 // |
| 281 // TODO(mmenke): Consider removing this in favor of the above method. See: |
| 282 // https://crbug.com/743251. |
| 283 void set_transport_security_persister_readonly( |
| 284 bool transport_security_persister_readonly) { |
| 285 transport_security_persister_readonly_ = |
| 286 transport_security_persister_readonly; |
| 287 } |
| 288 |
249 void SetSpdyAndQuicEnabled(bool spdy_enabled, | 289 void SetSpdyAndQuicEnabled(bool spdy_enabled, |
250 bool quic_enabled); | 290 bool quic_enabled); |
251 | 291 |
252 void set_throttling_enabled(bool throttling_enabled) { | 292 void set_throttling_enabled(bool throttling_enabled) { |
253 throttling_enabled_ = throttling_enabled; | 293 throttling_enabled_ = throttling_enabled; |
254 } | 294 } |
255 | 295 |
256 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); | 296 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); |
257 void set_ct_policy_enforcer( | 297 void set_ct_policy_enforcer( |
258 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer); | 298 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer); |
259 | 299 |
260 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); | 300 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); |
261 | 301 |
| 302 // Makes the created URLRequestContext use a shared CertVerifier object. |
| 303 // Should not be used it SetCertVerifier() is used. The consumer must ensure |
| 304 // the CertVerifier outlives the URLRequestContext returned by the builder. |
| 305 // |
| 306 // TODO(mmenke): Figure out if consumers can use SetCertVerifier instead. See: |
| 307 // https://crbug.com/743251. |
| 308 void set_shared_cert_verifier(CertVerifier* shared_cert_verifier); |
| 309 |
262 #if BUILDFLAG(ENABLE_REPORTING) | 310 #if BUILDFLAG(ENABLE_REPORTING) |
263 void set_reporting_policy( | 311 void set_reporting_policy( |
264 std::unique_ptr<net::ReportingPolicy> reporting_policy); | 312 std::unique_ptr<net::ReportingPolicy> reporting_policy); |
265 #endif // BUILDFLAG(ENABLE_REPORTING) | 313 #endif // BUILDFLAG(ENABLE_REPORTING) |
266 | 314 |
267 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> | 315 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> |
268 url_request_interceptors); | 316 url_request_interceptors); |
269 | 317 |
| 318 // Sets a callback that is passed ownership of the URLRequestJobFactory, and |
| 319 // can wrap it in another URLRequestJobFactory. URLRequestInterceptors can't |
| 320 // handle intercepting unsupported protocols, while this case. |
| 321 // TODO(mmenke): Remove this, once it's no longer needed. |
| 322 void set_create_intercepting_job_factory( |
| 323 CreateInterceptingJobFactory create_intercepting_job_factory); |
| 324 |
270 // Override the default in-memory cookie store and channel id service. | 325 // Override the default in-memory cookie store and channel id service. |
271 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and | 326 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and |
272 // ChannelIDService will be disabled for this context. | 327 // ChannelIDService will be disabled for this context. |
273 // If |cookie_store| is not NULL and |channel_id_service| is NULL, | 328 // If |cookie_store| is not NULL and |channel_id_service| is NULL, |
274 // only ChannelIdService is disabled for this context. | 329 // only ChannelIdService is disabled for this context. |
275 // Note that a persistent cookie store should not be used with an in-memory | 330 // Note that a persistent cookie store should not be used with an in-memory |
276 // channel id service, and one cookie store should not be shared between | 331 // channel id service, and one cookie store should not be shared between |
277 // multiple channel-id stores (or used both with and without a channel id | 332 // multiple channel-id stores (or used both with and without a channel id |
278 // store). | 333 // store). |
279 void SetCookieAndChannelIdStores( | 334 void SetCookieAndChannelIdStores( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 NetworkDelegate* network_delegate, | 370 NetworkDelegate* network_delegate, |
316 NetLog* net_log); | 371 NetLog* net_log); |
317 | 372 |
318 private: | 373 private: |
319 const char* name_; | 374 const char* name_; |
320 bool enable_brotli_; | 375 bool enable_brotli_; |
321 NetworkQualityEstimator* network_quality_estimator_; | 376 NetworkQualityEstimator* network_quality_estimator_; |
322 | 377 |
323 std::string accept_language_; | 378 std::string accept_language_; |
324 std::string user_agent_; | 379 std::string user_agent_; |
| 380 HttpUserAgentSettings* shared_http_user_agent_settings_; |
| 381 |
325 // Include support for data:// requests. | 382 // Include support for data:// requests. |
326 bool data_enabled_; | 383 bool data_enabled_; |
327 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) | 384 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) |
328 // Include support for file:// requests. | 385 // Include support for file:// requests. |
329 bool file_enabled_; | 386 bool file_enabled_; |
330 #endif | 387 #endif |
331 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) | 388 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) |
332 // Include support for ftp:// requests. | 389 // Include support for ftp:// requests. |
333 bool ftp_enabled_; | 390 bool ftp_enabled_; |
334 #endif | 391 #endif |
335 bool http_cache_enabled_; | 392 bool http_cache_enabled_; |
336 bool throttling_enabled_; | 393 bool throttling_enabled_; |
337 bool sdch_enabled_; | 394 bool sdch_enabled_; |
338 bool cookie_store_set_by_client_; | 395 bool cookie_store_set_by_client_; |
339 | 396 |
340 scoped_refptr<base::SingleThreadTaskRunner> cache_thread_task_runner_; | 397 scoped_refptr<base::SingleThreadTaskRunner> cache_thread_task_runner_; |
341 HttpCacheParams http_cache_params_; | 398 HttpCacheParams http_cache_params_; |
342 HttpNetworkSession::Params http_network_session_params_; | 399 HttpNetworkSession::Params http_network_session_params_; |
343 base::FilePath transport_security_persister_path_; | 400 base::FilePath transport_security_persister_path_; |
| 401 bool transport_security_persister_readonly_; |
344 NetLog* net_log_; | 402 NetLog* net_log_; |
345 std::unique_ptr<HostResolver> host_resolver_; | 403 std::unique_ptr<HostResolver> host_resolver_; |
| 404 net::HostResolver* shared_host_resolver_; |
346 std::unique_ptr<ChannelIDService> channel_id_service_; | 405 std::unique_ptr<ChannelIDService> channel_id_service_; |
347 std::unique_ptr<ProxyConfigService> proxy_config_service_; | 406 std::unique_ptr<ProxyConfigService> proxy_config_service_; |
348 bool pac_quick_check_enabled_; | 407 bool pac_quick_check_enabled_; |
349 ProxyService::SanitizeUrlPolicy pac_sanitize_url_policy_; | 408 ProxyService::SanitizeUrlPolicy pac_sanitize_url_policy_; |
350 std::unique_ptr<ProxyService> proxy_service_; | 409 std::unique_ptr<ProxyService> proxy_service_; |
351 scoped_refptr<net::SSLConfigService> ssl_config_service_; | 410 scoped_refptr<net::SSLConfigService> ssl_config_service_; |
352 std::unique_ptr<NetworkDelegate> network_delegate_; | 411 std::unique_ptr<NetworkDelegate> network_delegate_; |
353 std::unique_ptr<ProxyDelegate> proxy_delegate_; | 412 std::unique_ptr<ProxyDelegate> proxy_delegate_; |
| 413 ProxyDelegate* shared_proxy_delegate_; |
354 std::unique_ptr<CookieStore> cookie_store_; | 414 std::unique_ptr<CookieStore> cookie_store_; |
355 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 415 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 416 HttpAuthHandlerFactory* shared_http_auth_handler_factory_; |
356 std::unique_ptr<CertVerifier> cert_verifier_; | 417 std::unique_ptr<CertVerifier> cert_verifier_; |
| 418 CertVerifier* shared_cert_verifier_; |
357 std::unique_ptr<CTVerifier> ct_verifier_; | 419 std::unique_ptr<CTVerifier> ct_verifier_; |
358 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer_; | 420 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer_; |
359 #if BUILDFLAG(ENABLE_REPORTING) | 421 #if BUILDFLAG(ENABLE_REPORTING) |
360 std::unique_ptr<net::ReportingPolicy> reporting_policy_; | 422 std::unique_ptr<net::ReportingPolicy> reporting_policy_; |
361 #endif // BUILDFLAG(ENABLE_REPORTING) | 423 #endif // BUILDFLAG(ENABLE_REPORTING) |
362 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; | 424 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; |
| 425 CreateInterceptingJobFactory create_intercepting_job_factory_; |
363 std::unique_ptr<HttpServerProperties> http_server_properties_; | 426 std::unique_ptr<HttpServerProperties> http_server_properties_; |
364 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> | 427 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> |
365 protocol_handlers_; | 428 protocol_handlers_; |
366 | 429 |
367 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 430 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
368 }; | 431 }; |
369 | 432 |
370 } // namespace net | 433 } // namespace net |
371 | 434 |
372 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 435 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |