OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
6 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/common/previews_state.h" | 16 #include "content/public/common/previews_state.h" |
17 #include "content/public/common/resource_devtools_info.h" | 17 #include "content/public/common/resource_devtools_info.h" |
18 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
19 #include "net/base/load_timing_info.h" | 19 #include "net/base/load_timing_info.h" |
20 #include "net/cert/signed_certificate_timestamp_and_status.h" | 20 #include "net/cert/signed_certificate_timestamp_and_status.h" |
21 #include "net/http/http_response_headers.h" | 21 #include "net/http/http_response_headers.h" |
22 #include "net/http/http_response_info.h" | 22 #include "net/http/http_response_info.h" |
23 #include "net/nqe/effective_connection_type.h" | 23 #include "net/nqe/effective_connection_type.h" |
24 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" | 24 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 // Note: when modifying this structure, also update ResourceResponse::DeepCopy | 29 // NOTE: when modifying this structure, also update ResourceResponse::DeepCopy |
30 // in resource_response.cc. | 30 // in resource_response.cc. |
31 struct CONTENT_EXPORT ResourceResponseInfo { | 31 struct CONTENT_EXPORT ResourceResponseInfo { |
32 ResourceResponseInfo(); | 32 ResourceResponseInfo(); |
33 ResourceResponseInfo(const ResourceResponseInfo& other); | 33 ResourceResponseInfo(const ResourceResponseInfo& other); |
34 ~ResourceResponseInfo(); | 34 ~ResourceResponseInfo(); |
35 | 35 |
36 // The time at which the request was made that resulted in this response. | 36 // The time at which the request was made that resulted in this response. |
37 // For cached responses, this time could be "far" in the past. | 37 // For cached responses, this time could be "far" in the past. |
38 base::Time request_time; | 38 base::Time request_time; |
39 | 39 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // report_raw_headers to true. | 175 // report_raw_headers to true. |
176 net::SignedCertificateTimestampAndStatusList signed_certificate_timestamps; | 176 net::SignedCertificateTimestampAndStatusList signed_certificate_timestamps; |
177 | 177 |
178 // In case this is a CORS response fetched by a ServiceWorker, this is the | 178 // In case this is a CORS response fetched by a ServiceWorker, this is the |
179 // set of headers that should be exposed. | 179 // set of headers that should be exposed. |
180 std::vector<std::string> cors_exposed_header_names; | 180 std::vector<std::string> cors_exposed_header_names; |
181 | 181 |
182 // True if service worker navigation preload was performed due to the request | 182 // True if service worker navigation preload was performed due to the request |
183 // for this response. | 183 // for this response. |
184 bool did_service_worker_navigation_preload; | 184 bool did_service_worker_navigation_preload; |
| 185 |
| 186 // NOTE: When adding or changing fields here, also update |
| 187 // ResourceResponse::DeepCopy in resource_response.cc. |
185 }; | 188 }; |
186 | 189 |
187 } // namespace content | 190 } // namespace content |
188 | 191 |
189 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 192 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
OLD | NEW |