OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 WEBKIT_COMMON_RESOURCE_RESPONSE_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
6 #define WEBKIT_COMMON_RESOURCE_RESPONSE_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/common/content_export.h" |
14 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
15 #include "net/base/load_timing_info.h" | 16 #include "net/base/load_timing_info.h" |
16 #include "net/http/http_response_info.h" | 17 #include "net/http/http_response_info.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 #include "webkit/common/resource_devtools_info.h" | 19 #include "webkit/common/resource_devtools_info.h" |
19 | 20 |
20 namespace webkit_glue { | 21 namespace content { |
21 | 22 |
22 struct ResourceResponseInfo { | 23 struct ResourceResponseInfo { |
23 WEBKIT_COMMON_EXPORT ResourceResponseInfo(); | 24 CONTENT_EXPORT ResourceResponseInfo(); |
24 WEBKIT_COMMON_EXPORT ~ResourceResponseInfo(); | 25 CONTENT_EXPORT ~ResourceResponseInfo(); |
25 | 26 |
26 // The time at which the request was made that resulted in this response. | 27 // The time at which the request was made that resulted in this response. |
27 // For cached responses, this time could be "far" in the past. | 28 // For cached responses, this time could be "far" in the past. |
28 base::Time request_time; | 29 base::Time request_time; |
29 | 30 |
30 // The time at which the response headers were received. For cached | 31 // The time at which the response headers were received. For cached |
31 // responses, this time could be "far" in the past. | 32 // responses, this time could be "far" in the past. |
32 base::Time response_time; | 33 base::Time response_time; |
33 | 34 |
34 // The response headers or NULL if the URL type does not support headers. | 35 // The response headers or NULL if the URL type does not support headers. |
(...skipping 24 matching lines...) Expand all Loading... |
59 // Note: this value is only populated for main resource requests. | 60 // Note: this value is only populated for main resource requests. |
60 GURL appcache_manifest_url; | 61 GURL appcache_manifest_url; |
61 | 62 |
62 // Detailed timing information used by the WebTiming, HAR and Developer | 63 // Detailed timing information used by the WebTiming, HAR and Developer |
63 // Tools. Includes socket ID and socket reuse information. | 64 // Tools. Includes socket ID and socket reuse information. |
64 net::LoadTimingInfo load_timing; | 65 net::LoadTimingInfo load_timing; |
65 | 66 |
66 // Actual request and response headers, as obtained from the network stack. | 67 // Actual request and response headers, as obtained from the network stack. |
67 // Only present if request had LOAD_REPORT_RAW_HEADERS in load_flags, and | 68 // Only present if request had LOAD_REPORT_RAW_HEADERS in load_flags, and |
68 // requesting renderer had CanReadRowCookies permission. | 69 // requesting renderer had CanReadRowCookies permission. |
69 scoped_refptr<ResourceDevToolsInfo> devtools_info; | 70 scoped_refptr<webkit_glue::ResourceDevToolsInfo> devtools_info; |
70 | 71 |
71 // The path to a file that will contain the response body. It may only | 72 // The path to a file that will contain the response body. It may only |
72 // contain a portion of the response body at the time that the ResponseInfo | 73 // contain a portion of the response body at the time that the ResponseInfo |
73 // becomes available. | 74 // becomes available. |
74 base::FilePath download_file_path; | 75 base::FilePath download_file_path; |
75 | 76 |
76 // True if the response was delivered using SPDY. | 77 // True if the response was delivered using SPDY. |
77 bool was_fetched_via_spdy; | 78 bool was_fetched_via_spdy; |
78 | 79 |
79 // True if the response was delivered after NPN is negotiated. | 80 // True if the response was delivered after NPN is negotiated. |
(...skipping 11 matching lines...) Expand all Loading... |
91 // Note: we cannot tell if a transparent proxy may have been involved. | 92 // Note: we cannot tell if a transparent proxy may have been involved. |
92 bool was_fetched_via_proxy; | 93 bool was_fetched_via_proxy; |
93 | 94 |
94 // NPN protocol negotiated with the server. | 95 // NPN protocol negotiated with the server. |
95 std::string npn_negotiated_protocol; | 96 std::string npn_negotiated_protocol; |
96 | 97 |
97 // Remote address of the socket which fetched this resource. | 98 // Remote address of the socket which fetched this resource. |
98 net::HostPortPair socket_address; | 99 net::HostPortPair socket_address; |
99 }; | 100 }; |
100 | 101 |
101 } // namespace webkit_glue | 102 } // namespace content |
102 | 103 |
103 #endif // WEBKIT_COMMON_RESOURCE_RESPONSE_INFO_H_ | 104 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
OLD | NEW |