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

Side by Side Diff: net/spdy/spdy_protocol.cc

Issue 1141473003: Pass StringPiece by value instead of const ref in SpdyFramer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_protocol.h ('k') | no next file » | 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 #include "net/spdy/spdy_protocol.h" 5 #include "net/spdy/spdy_protocol.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR(
10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {}
11 11
12 SpdyFrameWithNameValueBlockIR::~SpdyFrameWithNameValueBlockIR() {} 12 SpdyFrameWithNameValueBlockIR::~SpdyFrameWithNameValueBlockIR() {}
13 13
14 SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id, const base::StringPiece& data) 14 SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id, base::StringPiece data)
15 : SpdyFrameWithFinIR(stream_id), 15 : SpdyFrameWithFinIR(stream_id), padded_(false), padding_payload_len_(0) {
16 padded_(false),
17 padding_payload_len_(0) {
18 SetDataDeep(data); 16 SetDataDeep(data);
19 } 17 }
20 18
21 SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id) 19 SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id)
22 : SpdyFrameWithFinIR(stream_id), 20 : SpdyFrameWithFinIR(stream_id),
23 padded_(false), 21 padded_(false),
24 padding_payload_len_(0) {} 22 padding_payload_len_(0) {}
25 23
26 SpdyDataIR::~SpdyDataIR() {} 24 SpdyDataIR::~SpdyDataIR() {}
27 25
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 void SpdySettingsIR::Visit(SpdyFrameVisitor* visitor) const { 798 void SpdySettingsIR::Visit(SpdyFrameVisitor* visitor) const {
801 return visitor->VisitSettings(*this); 799 return visitor->VisitSettings(*this);
802 } 800 }
803 801
804 void SpdyPingIR::Visit(SpdyFrameVisitor* visitor) const { 802 void SpdyPingIR::Visit(SpdyFrameVisitor* visitor) const {
805 return visitor->VisitPing(*this); 803 return visitor->VisitPing(*this);
806 } 804 }
807 805
808 SpdyGoAwayIR::SpdyGoAwayIR(SpdyStreamId last_good_stream_id, 806 SpdyGoAwayIR::SpdyGoAwayIR(SpdyStreamId last_good_stream_id,
809 SpdyGoAwayStatus status, 807 SpdyGoAwayStatus status,
810 const base::StringPiece& description) 808 base::StringPiece description)
811 : description_(description) { 809 : description_(description) {
812 set_last_good_stream_id(last_good_stream_id); 810 set_last_good_stream_id(last_good_stream_id);
813 set_status(status); 811 set_status(status);
814 } 812 }
815 813
816 SpdyGoAwayIR::~SpdyGoAwayIR() {} 814 SpdyGoAwayIR::~SpdyGoAwayIR() {}
817 815
818 const base::StringPiece& SpdyGoAwayIR::description() const { 816 const base::StringPiece& SpdyGoAwayIR::description() const {
819 return description_; 817 return description_;
820 } 818 }
(...skipping 29 matching lines...) Expand all
850 848
851 void SpdyAltSvcIR::Visit(SpdyFrameVisitor* visitor) const { 849 void SpdyAltSvcIR::Visit(SpdyFrameVisitor* visitor) const {
852 return visitor->VisitAltSvc(*this); 850 return visitor->VisitAltSvc(*this);
853 } 851 }
854 852
855 void SpdyPriorityIR::Visit(SpdyFrameVisitor* visitor) const { 853 void SpdyPriorityIR::Visit(SpdyFrameVisitor* visitor) const {
856 return visitor->VisitPriority(*this); 854 return visitor->VisitPriority(*this);
857 } 855 }
858 856
859 } // namespace net 857 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698