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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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
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 2 and 3 5 // This file contains some protocol structures for use with SPDY 2 and 3
6 // The SPDY 2 spec can be found at: 6 // The SPDY 2 spec can be found at:
7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2
8 // The SPDY 3 spec can be found at: 8 // The SPDY 3 spec can be found at:
9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3
10 10
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR { 962 class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
963 public: 963 public:
964 explicit SpdyAltSvcIR(SpdyStreamId stream_id); 964 explicit SpdyAltSvcIR(SpdyStreamId stream_id);
965 ~SpdyAltSvcIR() override; 965 ~SpdyAltSvcIR() override;
966 966
967 std::string origin() const { return origin_; } 967 std::string origin() const { return origin_; }
968 const SpdyAltSvcWireFormat::AlternativeServiceVector& altsvc_vector() const { 968 const SpdyAltSvcWireFormat::AlternativeServiceVector& altsvc_vector() const {
969 return altsvc_vector_; 969 return altsvc_vector_;
970 } 970 }
971 971
972 void set_origin(const std::string origin) { origin_ = origin; } 972 void set_origin(const std::string& origin) { origin_ = origin; }
973 void add_altsvc(const SpdyAltSvcWireFormat::AlternativeService& altsvc) { 973 void add_altsvc(const SpdyAltSvcWireFormat::AlternativeService& altsvc) {
974 altsvc_vector_.push_back(altsvc); 974 altsvc_vector_.push_back(altsvc);
975 } 975 }
976 976
977 void Visit(SpdyFrameVisitor* visitor) const override; 977 void Visit(SpdyFrameVisitor* visitor) const override;
978 978
979 private: 979 private:
980 std::string origin_; 980 std::string origin_;
981 SpdyAltSvcWireFormat::AlternativeServiceVector altsvc_vector_; 981 SpdyAltSvcWireFormat::AlternativeServiceVector altsvc_vector_;
982 DISALLOW_COPY_AND_ASSIGN(SpdyAltSvcIR); 982 DISALLOW_COPY_AND_ASSIGN(SpdyAltSvcIR);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 SpdyFrameVisitor() {} 1081 SpdyFrameVisitor() {}
1082 virtual ~SpdyFrameVisitor() {} 1082 virtual ~SpdyFrameVisitor() {}
1083 1083
1084 private: 1084 private:
1085 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); 1085 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor);
1086 }; 1086 };
1087 1087
1088 } // namespace net 1088 } // namespace net
1089 1089
1090 #endif // NET_SPDY_SPDY_PROTOCOL_H_ 1090 #endif // NET_SPDY_SPDY_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698