OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 NET_HTTP_HTTP_RESPONSE_INFO_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_ |
6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ |
7 | 7 |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "net/base/auth.h" | 9 #include "net/base/auth.h" |
10 #include "net/base/ssl_info.h" | 10 #include "net/base/ssl_info.h" |
11 #include "net/http/http_vary_data.h" | 11 #include "net/http/http_vary_data.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 class HttpResponseHeaders; | 15 class HttpResponseHeaders; |
| 16 class SSLCertRequestInfo; |
16 | 17 |
17 class HttpResponseInfo { | 18 class HttpResponseInfo { |
18 public: | 19 public: |
19 HttpResponseInfo(); | 20 HttpResponseInfo(); |
20 ~HttpResponseInfo(); | 21 ~HttpResponseInfo(); |
21 // Default copy-constructor and assignment operator are OK! | 22 // Default copy-constructor and assignment operator are OK! |
22 | 23 |
23 // The following is only defined if the request_time member is set. | 24 // The following is only defined if the request_time member is set. |
24 // If this response was resurrected from cache, then this bool is set, and | 25 // If this response was resurrected from cache, then this bool is set, and |
25 // request_time may corresponds to a time "far" in the past. Note that | 26 // request_time may corresponds to a time "far" in the past. Note that |
26 // stale content (perhaps un-cacheable) may be fetched from cache subject to | 27 // stale content (perhaps un-cacheable) may be fetched from cache subject to |
27 // the load flags specified on the request info. For example, this is done | 28 // the load flags specified on the request info. For example, this is done |
28 // when a user presses the back button to re-render pages, or at startup, when | 29 // when a user presses the back button to re-render pages, or at startup, when |
29 // reloading previously visited pages (without going over the network). | 30 // reloading previously visited pages (without going over the network). |
30 bool was_cached; | 31 bool was_cached; |
31 | 32 |
32 // The time at which the request was made that resulted in this response. | 33 // The time at which the request was made that resulted in this response. |
33 // For cached responses, this time could be "far" in the past. | 34 // For cached responses, this time could be "far" in the past. |
34 base::Time request_time; | 35 base::Time request_time; |
35 | 36 |
36 // The time at which the response headers were received. For cached | 37 // The time at which the response headers were received. For cached |
37 // responses, this time could be "far" in the past. | 38 // responses, this time could be "far" in the past. |
38 base::Time response_time; | 39 base::Time response_time; |
39 | 40 |
40 // If the response headers indicate a 401 or 407 failure, then this structure | 41 // If the response headers indicate a 401 or 407 failure, then this structure |
41 // will contain additional information about the authentication challenge. | 42 // will contain additional information about the authentication challenge. |
42 scoped_refptr<AuthChallengeInfo> auth_challenge; | 43 scoped_refptr<AuthChallengeInfo> auth_challenge; |
43 | 44 |
| 45 // The SSL client certificate request info. |
| 46 // TODO(wtc): does this really belong in HttpResponseInfo? I put it here |
| 47 // because it is similar to |auth_challenge|, but unlike HTTP authentication |
| 48 // challenge, client certificate request is not part of an HTTP response. |
| 49 scoped_refptr<SSLCertRequestInfo> cert_request_info; |
| 50 |
44 // The SSL connection info (if HTTPS). | 51 // The SSL connection info (if HTTPS). |
45 SSLInfo ssl_info; | 52 SSLInfo ssl_info; |
46 | 53 |
47 // The parsed response headers and status line. | 54 // The parsed response headers and status line. |
48 scoped_refptr<HttpResponseHeaders> headers; | 55 scoped_refptr<HttpResponseHeaders> headers; |
49 | 56 |
50 // The "Vary" header data for this response. | 57 // The "Vary" header data for this response. |
51 HttpVaryData vary_data; | 58 HttpVaryData vary_data; |
52 }; | 59 }; |
53 | 60 |
54 } // namespace net | 61 } // namespace net |
55 | 62 |
56 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ | 63 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ |
OLD | NEW |