OLD | NEW |
1 // Copyright (c) 2006-2009 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "net/base/ssl_info.h" | 10 #include "net/base/ssl_info.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class HttpResponseInfo { | 22 class HttpResponseInfo { |
23 public: | 23 public: |
24 HttpResponseInfo(); | 24 HttpResponseInfo(); |
25 HttpResponseInfo(const HttpResponseInfo& rhs); | 25 HttpResponseInfo(const HttpResponseInfo& rhs); |
26 ~HttpResponseInfo(); | 26 ~HttpResponseInfo(); |
27 HttpResponseInfo& operator=(const HttpResponseInfo& rhs); | 27 HttpResponseInfo& operator=(const HttpResponseInfo& rhs); |
28 // Even though we could get away with the copy ctor and default operator=, | 28 // Even though we could get away with the copy ctor and default operator=, |
29 // that would prevent us from doing a bunch of forward declaration. | 29 // that would prevent us from doing a bunch of forward declaration. |
30 | 30 |
| 31 // Initializes from the representation stored in the given pickle. |
| 32 bool InitFromPickle(const Pickle& pickle, bool* response_truncated); |
| 33 |
| 34 // Call this method to persist the response info. |
| 35 void Persist(Pickle* pickle, |
| 36 bool skip_transient_headers, |
| 37 bool response_truncated) const; |
| 38 |
31 // The following is only defined if the request_time member is set. | 39 // The following is only defined if the request_time member is set. |
32 // If this response was resurrected from cache, then this bool is set, and | 40 // If this response was resurrected from cache, then this bool is set, and |
33 // request_time may corresponds to a time "far" in the past. Note that | 41 // request_time may corresponds to a time "far" in the past. Note that |
34 // stale content (perhaps un-cacheable) may be fetched from cache subject to | 42 // stale content (perhaps un-cacheable) may be fetched from cache subject to |
35 // the load flags specified on the request info. For example, this is done | 43 // the load flags specified on the request info. For example, this is done |
36 // when a user presses the back button to re-render pages, or at startup, | 44 // when a user presses the back button to re-render pages, or at startup, |
37 // when reloading previously visited pages (without going over the network). | 45 // when reloading previously visited pages (without going over the network). |
38 bool was_cached; | 46 bool was_cached; |
39 | 47 |
40 // True if the request was fetched over a SPDY channel. | 48 // True if the request was fetched over a SPDY channel. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 SSLInfo ssl_info; | 82 SSLInfo ssl_info; |
75 | 83 |
76 // The parsed response headers and status line. | 84 // The parsed response headers and status line. |
77 scoped_refptr<HttpResponseHeaders> headers; | 85 scoped_refptr<HttpResponseHeaders> headers; |
78 | 86 |
79 // The "Vary" header data for this response. | 87 // The "Vary" header data for this response. |
80 HttpVaryData vary_data; | 88 HttpVaryData vary_data; |
81 | 89 |
82 // Any metadata asociated with this resource's cached data. | 90 // Any metadata asociated with this resource's cached data. |
83 scoped_refptr<IOBufferWithSize> metadata; | 91 scoped_refptr<IOBufferWithSize> metadata; |
84 | |
85 // Initializes from the representation stored in the given pickle. | |
86 bool InitFromPickle(const Pickle& pickle, bool* response_truncated); | |
87 | |
88 // Call this method to persist the response info. | |
89 void Persist(Pickle* pickle, | |
90 bool skip_transient_headers, | |
91 bool response_truncated) const; | |
92 }; | 92 }; |
93 | 93 |
94 } // namespace net | 94 } // namespace net |
95 | 95 |
96 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ | 96 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ |
OLD | NEW |