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

Side by Side Diff: net/spdy/spdy_header_block.h

Issue 2102253003: Make SpdyHeaderBlock non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS fix. Created 4 years, 5 months 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
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_header_block.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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_
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_header_block.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698