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 <memory> |
13 #include <string> | 14 #include <string> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
18 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
19 #include "net/log/net_log.h" | 20 |
| 21 namespace base { |
| 22 class Value; |
| 23 } |
20 | 24 |
21 namespace net { | 25 namespace net { |
22 | 26 |
| 27 class NetLogCaptureMode; |
| 28 |
23 class NET_EXPORT HttpRequestHeaders { | 29 class NET_EXPORT HttpRequestHeaders { |
24 public: | 30 public: |
25 struct HeaderKeyValuePair { | 31 struct HeaderKeyValuePair { |
26 HeaderKeyValuePair(); | 32 HeaderKeyValuePair(); |
27 HeaderKeyValuePair(const base::StringPiece& key, | 33 HeaderKeyValuePair(const base::StringPiece& key, |
28 const base::StringPiece& value); | 34 const base::StringPiece& value); |
29 | 35 |
30 std::string key; | 36 std::string key; |
31 std::string value; | 37 std::string value; |
32 }; | 38 }; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Allow the copy construction and operator= to facilitate copying in | 183 // Allow the copy construction and operator= to facilitate copying in |
178 // HttpRequestHeaders. | 184 // HttpRequestHeaders. |
179 // TODO(willchan): Investigate to see if we can remove the need to copy | 185 // TODO(willchan): Investigate to see if we can remove the need to copy |
180 // HttpRequestHeaders. | 186 // HttpRequestHeaders. |
181 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); | 187 // DISALLOW_COPY_AND_ASSIGN(HttpRequestHeaders); |
182 }; | 188 }; |
183 | 189 |
184 } // namespace net | 190 } // namespace net |
185 | 191 |
186 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ | 192 #endif // NET_HTTP_HTTP_REQUEST_HEADERS_H_ |
OLD | NEW |