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

Side by Side Diff: net/tools/quic/quic_simple_server_stream.h

Issue 2093553004: Reduce SpdyHeaderBlock copies with move semantics in shared code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non-shared files (into a separate CL). 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/quic/quic_spdy_stream_test.cc ('k') | net/tools/quic/quic_simple_server_stream.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_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 virtual void SendResponse(); 57 virtual void SendResponse();
58 58
59 // Sends a basic 500 response using SendHeaders for the headers and WriteData 59 // Sends a basic 500 response using SendHeaders for the headers and WriteData
60 // for the body. 60 // for the body.
61 virtual void SendErrorResponse(); 61 virtual void SendErrorResponse();
62 62
63 // Sends a basic 404 response using SendHeaders for the headers and WriteData 63 // Sends a basic 404 response using SendHeaders for the headers and WriteData
64 // for the body. 64 // for the body.
65 void SendNotFoundResponse(); 65 void SendNotFoundResponse();
66 66
67 void SendHeadersAndBody(const SpdyHeaderBlock& response_headers, 67 void SendHeadersAndBody(SpdyHeaderBlock response_headers,
68 base::StringPiece body); 68 base::StringPiece body);
69 void SendHeadersAndBodyAndTrailers(const SpdyHeaderBlock& response_headers, 69 void SendHeadersAndBodyAndTrailers(SpdyHeaderBlock response_headers,
70 base::StringPiece body, 70 base::StringPiece body,
71 const SpdyHeaderBlock& response_trailers); 71 SpdyHeaderBlock response_trailers);
72 72
73 SpdyHeaderBlock* request_headers() { return &request_headers_; } 73 SpdyHeaderBlock* request_headers() { return &request_headers_; }
74 74
75 const std::string& body() { return body_; } 75 const std::string& body() { return body_; }
76 76
77 private: 77 private:
78 friend class test::QuicSimpleServerStreamPeer; 78 friend class test::QuicSimpleServerStreamPeer;
79 79
80 // The parsed headers received from the client. 80 // The parsed headers received from the client.
81 SpdyHeaderBlock request_headers_; 81 SpdyHeaderBlock request_headers_;
82 int64_t content_length_; 82 int64_t content_length_;
83 std::string body_; 83 std::string body_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream); 85 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream);
86 }; 86 };
87 87
88 } // namespace net 88 } // namespace net
89 89
90 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 90 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_stream_test.cc ('k') | net/tools/quic/quic_simple_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698