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

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

Issue 112343002: Merge ReliableQuicStream::WriteData with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/tools/quic/quic_spdy_client_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_SPDY_CLIENT_STREAM_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 27 matching lines...) Expand all
38 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE; 38 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE;
39 39
40 virtual void OnFinRead() OVERRIDE; 40 virtual void OnFinRead() OVERRIDE;
41 41
42 // Serializes the headers and body, sends it to the server, and 42 // Serializes the headers and body, sends it to the server, and
43 // returns the number of bytes sent. 43 // returns the number of bytes sent.
44 virtual ssize_t SendRequest(const BalsaHeaders& headers, 44 virtual ssize_t SendRequest(const BalsaHeaders& headers,
45 base::StringPiece body, 45 base::StringPiece body,
46 bool fin); 46 bool fin);
47 47
48 // Sends body data to the server and returns the number of bytes sent. 48 // Sends body data to the server, or buffers if it can't be sent immediately.
49 virtual ssize_t SendBody(const std::string& data, bool fin); 49 virtual void SendBody(const std::string& data, bool fin);
50 50
51 // Returns the response data. 51 // Returns the response data.
52 const std::string& data() { return data_; } 52 const std::string& data() { return data_; }
53 53
54 // Returns whatever headers have been received for this stream. 54 // Returns whatever headers have been received for this stream.
55 const BalsaHeaders& headers() { return headers_; } 55 const BalsaHeaders& headers() { return headers_; }
56 56
57 // While the server's set_priority shouldn't be called externally, the creator 57 // While the server's set_priority shouldn't be called externally, the creator
58 // of client-side streams should be able to set the priority. 58 // of client-side streams should be able to set the priority.
59 using ReliableQuicStream::set_priority; 59 using ReliableQuicStream::set_priority;
60 60
61 private: 61 private:
62 int ParseResponseHeaders(); 62 int ParseResponseHeaders();
63 63
64 BalsaHeaders headers_; 64 BalsaHeaders headers_;
65 std::string data_; 65 std::string data_;
66 66
67 scoped_refptr<GrowableIOBuffer> read_buf_; 67 scoped_refptr<GrowableIOBuffer> read_buf_;
68 bool response_headers_received_; 68 bool response_headers_received_;
69 }; 69 };
70 70
71 } // namespace tools 71 } // namespace tools
72 } // namespace net 72 } // namespace net
73 73
74 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ 74 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698