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

Side by Side Diff: net/spdy/spdy_protocol.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_header_block_test.cc ('k') | net/spdy/spdy_session_unittest.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 // This file contains some protocol structures for use with SPDY 3 and HTTP 2 5 // This file contains some protocol structures for use with SPDY 3 and HTTP 2
6 // The SPDY 3 spec can be found at: 6 // The SPDY 3 spec can be found at:
7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3
8 8
9 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ 9 #ifndef NET_SPDY_SPDY_PROTOCOL_H_
10 #define NET_SPDY_SPDY_PROTOCOL_H_ 10 #define NET_SPDY_SPDY_PROTOCOL_H_
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 }; 711 };
712 712
713 // Abstract class intended to be inherited by IRs that contain a header 713 // Abstract class intended to be inherited by IRs that contain a header
714 // block. Implies SpdyFrameWithFinIR. 714 // block. Implies SpdyFrameWithFinIR.
715 class NET_EXPORT_PRIVATE SpdyFrameWithHeaderBlockIR 715 class NET_EXPORT_PRIVATE SpdyFrameWithHeaderBlockIR
716 : public NON_EXPORTED_BASE(SpdyFrameWithFinIR) { 716 : public NON_EXPORTED_BASE(SpdyFrameWithFinIR) {
717 public: 717 public:
718 ~SpdyFrameWithHeaderBlockIR() override; 718 ~SpdyFrameWithHeaderBlockIR() override;
719 719
720 const SpdyHeaderBlock& header_block() const { return header_block_; } 720 const SpdyHeaderBlock& header_block() const { return header_block_; }
721 void set_header_block(const SpdyHeaderBlock& header_block) { 721 void set_header_block(SpdyHeaderBlock header_block) {
722 // Deep copy. 722 // Deep copy.
723 header_block_ = header_block; 723 header_block_ = std::move(header_block);
724 } 724 }
725 void SetHeader(base::StringPiece name, base::StringPiece value) { 725 void SetHeader(base::StringPiece name, base::StringPiece value) {
726 header_block_[name] = value; 726 header_block_[name] = value;
727 } 727 }
728 728
729 protected: 729 protected:
730 SpdyFrameWithHeaderBlockIR(SpdyStreamId stream_id, 730 SpdyFrameWithHeaderBlockIR(SpdyStreamId stream_id,
731 SpdyHeaderBlock header_block); 731 SpdyHeaderBlock header_block);
732 732
733 private: 733 private:
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 SpdyFrameVisitor() {} 1230 SpdyFrameVisitor() {}
1231 virtual ~SpdyFrameVisitor() {} 1231 virtual ~SpdyFrameVisitor() {}
1232 1232
1233 private: 1233 private:
1234 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); 1234 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor);
1235 }; 1235 };
1236 1236
1237 } // namespace net 1237 } // namespace net
1238 1238
1239 #endif // NET_SPDY_SPDY_PROTOCOL_H_ 1239 #endif // NET_SPDY_SPDY_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_header_block_test.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698