| OLD | NEW |
| 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_SERVER_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void SendHeadersAndBody(const SpdyHeaderBlock& response_headers, | 51 void SendHeadersAndBody(const SpdyHeaderBlock& response_headers, |
| 52 base::StringPiece body); | 52 base::StringPiece body); |
| 53 | 53 |
| 54 SpdyHeaderBlock* request_headers() { return &request_headers_; } | 54 SpdyHeaderBlock* request_headers() { return &request_headers_; } |
| 55 | 55 |
| 56 const std::string& body() { return body_; } | 56 const std::string& body() { return body_; } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 friend class test::QuicSpdyServerStreamPeer; | 59 friend class test::QuicSpdyServerStreamPeer; |
| 60 | 60 |
| 61 // Parses the request headers from |data| to |request_headers_|. | |
| 62 // Returns false if there was an error parsing the headers. | |
| 63 bool ParseRequestHeaders(const char* data, uint32 data_len); | |
| 64 | |
| 65 // The parsed headers received from the client. | 61 // The parsed headers received from the client. |
| 66 SpdyHeaderBlock request_headers_; | 62 SpdyHeaderBlock request_headers_; |
| 67 int content_length_; | 63 int content_length_; |
| 68 std::string body_; | 64 std::string body_; |
| 69 | 65 |
| 70 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); | 66 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); |
| 71 }; | 67 }; |
| 72 | 68 |
| 73 } // namespace tools | 69 } // namespace tools |
| 74 } // namespace net | 70 } // namespace net |
| 75 | 71 |
| 76 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ | 72 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| OLD | NEW |