| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // HttpRequestHeaders manages the request headers. | 5 // HttpRequestHeaders manages the request headers. |
| 6 // It maintains these in a vector of header key/value pairs, thereby maintaining | 6 // It maintains these in a vector of header key/value pairs, thereby maintaining |
| 7 // the order of the headers. This means that any lookups are linear time | 7 // the order of the headers. This means that any lookups are linear time |
| 8 // operations. | 8 // operations. |
| 9 | 9 |
| 10 #ifndef NET_HTTP_HTTP_REQUEST_HEADERS_H_ | 10 #ifndef NET_HTTP_HTTP_REQUEST_HEADERS_H_ |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 static const char kHost[]; | 66 static const char kHost[]; |
| 67 static const char kIfModifiedSince[]; | 67 static const char kIfModifiedSince[]; |
| 68 static const char kIfNoneMatch[]; | 68 static const char kIfNoneMatch[]; |
| 69 static const char kIfRange[]; | 69 static const char kIfRange[]; |
| 70 static const char kOrigin[]; | 70 static const char kOrigin[]; |
| 71 static const char kPragma[]; | 71 static const char kPragma[]; |
| 72 static const char kProxyConnection[]; | 72 static const char kProxyConnection[]; |
| 73 static const char kRange[]; | 73 static const char kRange[]; |
| 74 static const char kReferer[]; | 74 static const char kReferer[]; |
| 75 static const char kUserAgent[]; | 75 static const char kUserAgent[]; |
| 76 static const char kTransferEncoding[]; |
| 76 | 77 |
| 77 HttpRequestHeaders(); | 78 HttpRequestHeaders(); |
| 78 ~HttpRequestHeaders(); | 79 ~HttpRequestHeaders(); |
| 79 | 80 |
| 80 bool IsEmpty() const { return headers_.empty(); } | 81 bool IsEmpty() const { return headers_.empty(); } |
| 81 | 82 |
| 82 bool HasHeader(const base::StringPiece& key) const { | 83 bool HasHeader(const base::StringPiece& key) const { |
| 83 return FindHeader(key) != headers_.end(); | 84 return FindHeader(key) != headers_.end(); |
| 84 } | 85 } |
| 85 | 86 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Allow the copy construction and operator= to facilitate copying in | 146 // Allow the copy construction and operator= to facilitate copying in |
| 146 // HttpRequestInfo. | 147 // HttpRequestInfo. |
| 147 // TODO(willchan): Investigate to see if we can remove the need to copy | 148 // TODO(willchan): Investigate to see if we can remove the need to copy |
| 148 // HttpRequestInfo. | 149 // HttpRequestInfo. |
| 149 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); | 150 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 } // namespace net | 153 } // namespace net |
| 153 | 154 |
| 154 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ | 155 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ |
| OLD | NEW |