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