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

Side by Side Diff: net/tools/flip_server/streamer_interface.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ 5 #ifndef NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_
6 #define NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ 6 #define NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void Reset() override; 50 void Reset() override;
51 void ResetForNewInterface(int32 server_idx) override {} 51 void ResetForNewInterface(int32 server_idx) override {}
52 void ResetForNewConnection() override; 52 void ResetForNewConnection() override;
53 void Cleanup() override; 53 void Cleanup() override;
54 int PostAcceptHook() override; 54 int PostAcceptHook() override;
55 void NewStream(uint32 stream_id, 55 void NewStream(uint32 stream_id,
56 uint32 priority, 56 uint32 priority,
57 const std::string& filename) override {} 57 const std::string& filename) override {}
58 void SendEOF(uint32 stream_id) override {} 58 void SendEOF(uint32 stream_id) override {}
59 void SendErrorNotFound(uint32 stream_id) override {} 59 void SendErrorNotFound(uint32 stream_id) override {}
60 virtual void SendOKResponse(uint32 stream_id, std::string output) {} 60 virtual void SendOKResponse(uint32 stream_id, const std::string& output) {}
61 size_t SendSynStream(uint32 stream_id, const BalsaHeaders& headers) override; 61 size_t SendSynStream(uint32 stream_id, const BalsaHeaders& headers) override;
62 size_t SendSynReply(uint32 stream_id, const BalsaHeaders& headers) override; 62 size_t SendSynReply(uint32 stream_id, const BalsaHeaders& headers) override;
63 void SendDataFrame(uint32 stream_id, 63 void SendDataFrame(uint32 stream_id,
64 const char* data, 64 const char* data,
65 int64 len, 65 int64 len,
66 uint32 flags, 66 uint32 flags,
67 bool compress) override {} 67 bool compress) override {}
68 void set_is_request() override; 68 void set_is_request() override;
69 static std::string forward_ip_header() { return forward_ip_header_; } 69 static std::string forward_ip_header() { return forward_ip_header_; }
70 static void set_forward_ip_header(std::string value) { 70 static void set_forward_ip_header(const std::string& value) {
71 forward_ip_header_ = value; 71 forward_ip_header_ = value;
72 } 72 }
73 73
74 private: 74 private:
75 void SendEOFImpl(uint32 stream_id) {} 75 void SendEOFImpl(uint32 stream_id) {}
76 void SendErrorNotFoundImpl(uint32 stream_id) {} 76 void SendErrorNotFoundImpl(uint32 stream_id) {}
77 void SendOKResponseImpl(uint32 stream_id, std::string* output) {} 77 void SendOKResponseImpl(uint32 stream_id, std::string* output) {}
78 size_t SendSynReplyImpl(uint32 stream_id, const BalsaHeaders& headers) { 78 size_t SendSynReplyImpl(uint32 stream_id, const BalsaHeaders& headers) {
79 return 0; 79 return 0;
80 } 80 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 FlipAcceptor* acceptor_; 125 FlipAcceptor* acceptor_;
126 bool is_request_; 126 bool is_request_;
127 BalsaFrame* http_framer_; 127 BalsaFrame* http_framer_;
128 BalsaHeaders headers_; 128 BalsaHeaders headers_;
129 static std::string forward_ip_header_; 129 static std::string forward_ip_header_;
130 }; 130 };
131 131
132 } // namespace net 132 } // namespace net
133 133
134 #endif // NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ 134 #endif // NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698