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 // 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_ |
11 #define NET_HTTP_HTTP_REQUEST_HEADERS_H_ | 11 #define NET_HTTP_HTTP_REQUEST_HEADERS_H_ |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/string_piece.h" | 17 #include "base/strings/string_piece.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
19 #include "net/base/net_log.h" | 19 #include "net/base/net_log.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 class NET_EXPORT HttpRequestHeaders { | 23 class NET_EXPORT HttpRequestHeaders { |
24 public: | 24 public: |
25 struct HeaderKeyValuePair { | 25 struct HeaderKeyValuePair { |
26 HeaderKeyValuePair(); | 26 HeaderKeyValuePair(); |
27 HeaderKeyValuePair(const base::StringPiece& key, | 27 HeaderKeyValuePair(const base::StringPiece& key, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Allow the copy construction and operator= to facilitate copying in | 168 // Allow the copy construction and operator= to facilitate copying in |
169 // HttpRequestHeaders. | 169 // HttpRequestHeaders. |
170 // TODO(willchan): Investigate to see if we can remove the need to copy | 170 // TODO(willchan): Investigate to see if we can remove the need to copy |
171 // HttpRequestHeaders. | 171 // HttpRequestHeaders. |
172 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); | 172 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); |
173 }; | 173 }; |
174 | 174 |
175 } // namespace net | 175 } // namespace net |
176 | 176 |
177 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ | 177 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ |
OLD | NEW |