OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 const base::Time& current_time) const; | 222 const base::Time& current_time) const; |
223 | 223 |
224 // The following methods extract values from the response headers. If a | 224 // The following methods extract values from the response headers. If a |
225 // value is not present, then false is returned. Otherwise, true is returned | 225 // value is not present, then false is returned. Otherwise, true is returned |
226 // and the out param is assigned to the corresponding value. | 226 // and the out param is assigned to the corresponding value. |
227 bool GetMaxAgeValue(base::TimeDelta* value) const; | 227 bool GetMaxAgeValue(base::TimeDelta* value) const; |
228 bool GetAgeValue(base::TimeDelta* value) const; | 228 bool GetAgeValue(base::TimeDelta* value) const; |
229 bool GetDateValue(base::Time* value) const; | 229 bool GetDateValue(base::Time* value) const; |
230 bool GetLastModifiedValue(base::Time* value) const; | 230 bool GetLastModifiedValue(base::Time* value) const; |
231 bool GetExpiresValue(base::Time* value) const; | 231 bool GetExpiresValue(base::Time* value) const; |
232 bool GetStaleWhileRevalidateValue(base::TimeDelta* value) const; | |
233 | |
234 bool GetCacheControlDirective(const base::StringPiece& directive, | |
rvargas (doing something else)
2014/07/28 19:24:01
If we keep this declaration here we need documenta
Adam Rice
2014/07/29 17:04:45
I originally had it public just because there are
| |
235 base::TimeDelta* result) const; | |
232 | 236 |
233 // Extracts the time value of a particular header. This method looks for the | 237 // Extracts the time value of a particular header. This method looks for the |
234 // first matching header value and parses its value as a HTTP-date. | 238 // first matching header value and parses its value as a HTTP-date. |
235 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; | 239 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; |
236 | 240 |
237 // Determines if this response indicates a keep-alive connection. | 241 // Determines if this response indicates a keep-alive connection. |
238 bool IsKeepAlive() const; | 242 bool IsKeepAlive() const; |
239 | 243 |
240 // Returns true if this response has a strong etag or last-modified header. | 244 // Returns true if this response has a strong etag or last-modified header. |
241 // See section 13.3.3 of RFC 2616. | 245 // See section 13.3.3 of RFC 2616. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 | 385 |
382 // The parsed http version number (not normalized). | 386 // The parsed http version number (not normalized). |
383 HttpVersion parsed_http_version_; | 387 HttpVersion parsed_http_version_; |
384 | 388 |
385 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 389 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
386 }; | 390 }; |
387 | 391 |
388 } // namespace net | 392 } // namespace net |
389 | 393 |
390 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 394 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
OLD | NEW |