• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_HTTP_HTTP_STREAM_POOL_REQUEST_INFO_H_
6 #define NET_HTTP_HTTP_STREAM_POOL_REQUEST_INFO_H_
7 
8 #include "net/base/net_export.h"
9 #include "net/base/network_anonymization_key.h"
10 #include "net/base/privacy_mode.h"
11 #include "net/dns/public/secure_dns_policy.h"
12 #include "net/http/alternative_service.h"
13 #include "net/proxy_resolution/proxy_info.h"
14 #include "net/socket/socket_tag.h"
15 #include "url/scheme_host_port.h"
16 
17 namespace net {
18 
19 // Contains information to request a stream/preconnect from the HttpStreamPool.
20 struct NET_EXPORT_PRIVATE HttpStreamPoolRequestInfo {
21   HttpStreamPoolRequestInfo(url::SchemeHostPort destination,
22                             PrivacyMode privacy_mode,
23                             SocketTag socket_tag,
24                             NetworkAnonymizationKey network_anonymization_key,
25                             SecureDnsPolicy secure_dns_policy,
26                             bool disable_cert_network_fetches,
27                             AlternativeServiceInfo alternative_service_info,
28                             bool is_http1_allowed,
29                             int load_flags,
30                             ProxyInfo proxy_info);
31 
32   HttpStreamPoolRequestInfo(HttpStreamPoolRequestInfo&&);
33   HttpStreamPoolRequestInfo& operator=(HttpStreamPoolRequestInfo&&);
34 
35   // Move-only.
36   HttpStreamPoolRequestInfo(const HttpStreamPoolRequestInfo&) = delete;
37   HttpStreamPoolRequestInfo& operator=(const HttpStreamPoolRequestInfo&) =
38       delete;
39 
40   ~HttpStreamPoolRequestInfo();
41 
42   url::SchemeHostPort destination;
43   PrivacyMode privacy_mode = PrivacyMode::PRIVACY_MODE_DISABLED;
44   SocketTag socket_tag;
45   NetworkAnonymizationKey network_anonymization_key;
46   SecureDnsPolicy secure_dns_policy = SecureDnsPolicy::kAllow;
47   bool disable_cert_network_fetches = false;
48 
49   AlternativeServiceInfo alternative_service_info;
50   bool is_http1_allowed;
51   int load_flags = 0;
52   ProxyInfo proxy_info;
53 };
54 
55 }  // namespace net
56 
57 #endif  // NET_HTTP_HTTP_STREAM_POOL_REQUEST_INFO_H_
58