Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1411)

Side by Side Diff: net/http/http_response_headers.h

Issue 1481143002: Added HttpUtils::HasValidators and HttpResponse::HasValidators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // first matching header value and parses its value as a HTTP-date. 250 // first matching header value and parses its value as a HTTP-date.
251 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; 251 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const;
252 252
253 // Determines if this response indicates a keep-alive connection. 253 // Determines if this response indicates a keep-alive connection.
254 bool IsKeepAlive() const; 254 bool IsKeepAlive() const;
255 255
256 // Returns true if this response has a strong etag or last-modified header. 256 // Returns true if this response has a strong etag or last-modified header.
257 // See section 13.3.3 of RFC 2616. 257 // See section 13.3.3 of RFC 2616.
258 bool HasStrongValidators() const; 258 bool HasStrongValidators() const;
259 259
260 // Returns true if this response has validators (either strong or weak). See
261 // section 13.3.3 of RFC 2616.
bengr 2015/12/03 17:42:21 I'd add that it returns true specifically when the
jamartin (wrong) 2015/12/08 16:58:18 Done.
262 bool HasValidators() const;
263
260 // Extracts the value of the Content-Length header or returns -1 if there is 264 // Extracts the value of the Content-Length header or returns -1 if there is
261 // no such header in the response. 265 // no such header in the response.
262 int64 GetContentLength() const; 266 int64 GetContentLength() const;
263 267
264 // Extracts the value of the specified header or returns -1 if there is no 268 // Extracts the value of the specified header or returns -1 if there is no
265 // such header in the response. 269 // such header in the response.
266 int64 GetInt64HeaderValue(const std::string& header) const; 270 int64 GetInt64HeaderValue(const std::string& header) const;
267 271
268 // Extracts the values in a Content-Range header and returns true if they are 272 // Extracts the values in a Content-Range header and returns true if they are
269 // valid for a 206 response; otherwise returns false. 273 // valid for a 206 response; otherwise returns false.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 404
401 // The normalized http version (consistent with what GetStatusLine() returns). 405 // The normalized http version (consistent with what GetStatusLine() returns).
402 HttpVersion http_version_; 406 HttpVersion http_version_;
403 407
404 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); 408 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders);
405 }; 409 };
406 410
407 } // namespace net 411 } // namespace net
408 412
409 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ 413 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698