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_SPDY_SPDY_HEADER_BLOCK_H_ | 5 #ifndef NET_SPDY_SPDY_HEADER_BLOCK_H_ |
6 #define NET_SPDY_SPDY_HEADER_BLOCK_H_ | 6 #define NET_SPDY_SPDY_HEADER_BLOCK_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
| 14 #include "base/macros.h" |
14 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
15 #include "net/base/linked_hash_map.h" | 16 #include "net/base/linked_hash_map.h" |
16 #include "net/base/net_export.h" | 17 #include "net/base/net_export.h" |
17 #include "net/log/net_log.h" | 18 #include "net/log/net_log.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 // Allows arg-dependent lookup to work for logging's operator<<. | 22 // Allows arg-dependent lookup to work for logging's operator<<. |
22 using ::operator<<; | 23 using ::operator<<; |
23 | 24 |
(...skipping 21 matching lines...) Expand all Loading... |
45 | 46 |
46 public: | 47 public: |
47 using iterator = MapType::iterator; | 48 using iterator = MapType::iterator; |
48 using const_iterator = MapType::const_iterator; | 49 using const_iterator = MapType::const_iterator; |
49 using value_type = MapType::value_type; | 50 using value_type = MapType::value_type; |
50 using reverse_iterator = MapType::reverse_iterator; | 51 using reverse_iterator = MapType::reverse_iterator; |
51 | 52 |
52 class StringPieceProxy; | 53 class StringPieceProxy; |
53 | 54 |
54 SpdyHeaderBlock(); | 55 SpdyHeaderBlock(); |
55 SpdyHeaderBlock(const SpdyHeaderBlock& other); | 56 SpdyHeaderBlock(const SpdyHeaderBlock& other) = delete; |
56 SpdyHeaderBlock(SpdyHeaderBlock&& other); | 57 SpdyHeaderBlock(SpdyHeaderBlock&& other); |
57 ~SpdyHeaderBlock(); | 58 ~SpdyHeaderBlock(); |
58 | 59 |
59 SpdyHeaderBlock& operator=(const SpdyHeaderBlock& other); | 60 SpdyHeaderBlock& operator=(const SpdyHeaderBlock& other) = delete; |
60 SpdyHeaderBlock& operator=(SpdyHeaderBlock&& other); | 61 SpdyHeaderBlock& operator=(SpdyHeaderBlock&& other); |
| 62 SpdyHeaderBlock Clone() const; |
| 63 |
61 bool operator==(const SpdyHeaderBlock& other) const; | 64 bool operator==(const SpdyHeaderBlock& other) const; |
62 bool operator!=(const SpdyHeaderBlock& other) const; | 65 bool operator!=(const SpdyHeaderBlock& other) const; |
63 | 66 |
64 // Provides a human readable multi-line representation of the stored header | 67 // Provides a human readable multi-line representation of the stored header |
65 // keys and values. | 68 // keys and values. |
66 std::string DebugString() const; | 69 std::string DebugString() const; |
67 | 70 |
68 // These methods delegate to our MapType member. | 71 // These methods delegate to our MapType member. |
69 iterator begin() { return block_.begin(); } | 72 iterator begin() { return block_.begin(); } |
70 iterator end() { return block_.end(); } | 73 iterator end() { return block_.end(); } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // to |headers|. |event_param| must have been created by | 155 // to |headers|. |event_param| must have been created by |
153 // SpdyHeaderBlockNetLogCallback. On failure, returns false and clears | 156 // SpdyHeaderBlockNetLogCallback. On failure, returns false and clears |
154 // |headers|. | 157 // |headers|. |
155 NET_EXPORT bool SpdyHeaderBlockFromNetLogParam( | 158 NET_EXPORT bool SpdyHeaderBlockFromNetLogParam( |
156 const base::Value* event_param, | 159 const base::Value* event_param, |
157 SpdyHeaderBlock* headers); | 160 SpdyHeaderBlock* headers); |
158 | 161 |
159 } // namespace net | 162 } // namespace net |
160 | 163 |
161 #endif // NET_SPDY_SPDY_HEADER_BLOCK_H_ | 164 #endif // NET_SPDY_SPDY_HEADER_BLOCK_H_ |
OLD | NEW |