| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "net/tools/quic/quic_simple_server_stream.h" | 5 #include "net/tools/quic/quic_simple_server_stream.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 static void SendErrorResponse(QuicSimpleServerStream* stream) { | 60 static void SendErrorResponse(QuicSimpleServerStream* stream) { |
| 61 stream->SendErrorResponse(); | 61 stream->SendErrorResponse(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 static const string& body(QuicSimpleServerStream* stream) { | 64 static const string& body(QuicSimpleServerStream* stream) { |
| 65 return stream->body_; | 65 return stream->body_; |
| 66 } | 66 } |
| 67 | 67 |
| 68 static const int content_length(QuicSimpleServerStream* stream) { | 68 static int content_length(QuicSimpleServerStream* stream) { |
| 69 return stream->content_length_; | 69 return stream->content_length_; |
| 70 } | 70 } |
| 71 | 71 |
| 72 static SpdyHeaderBlock& headers(QuicSimpleServerStream* stream) { | 72 static SpdyHeaderBlock& headers(QuicSimpleServerStream* stream) { |
| 73 return stream->request_headers_; | 73 return stream->request_headers_; |
| 74 } | 74 } |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 namespace { | 77 namespace { |
| 78 | 78 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 StringPiece data(arr, arraysize(arr)); | 489 StringPiece data(arr, arraysize(arr)); |
| 490 QuicStreamFrame frame(stream_->id(), true, 0, data); | 490 QuicStreamFrame frame(stream_->id(), true, 0, data); |
| 491 // Verify that we don't crash when we get a invalid headers in stream frame. | 491 // Verify that we don't crash when we get a invalid headers in stream frame. |
| 492 stream_->OnStreamFrame(frame); | 492 stream_->OnStreamFrame(frame); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace | 495 } // namespace |
| 496 } // namespace test | 496 } // namespace test |
| 497 } // namespace tools | 497 } // namespace tools |
| 498 } // namespace net | 498 } // namespace net |
| OLD | NEW |