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/spdy/spdy_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <utility> | 10 #include <utility> |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 ping_ir.set_is_ack(is_ack); | 751 ping_ir.set_is_ack(is_ack); |
752 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(ping_ir)); | 752 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(ping_ir)); |
753 } | 753 } |
754 | 754 |
755 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway() { | 755 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway() { |
756 return ConstructSpdyGoAway(0); | 756 return ConstructSpdyGoAway(0); |
757 } | 757 } |
758 | 758 |
759 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway( | 759 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway( |
760 SpdyStreamId last_good_stream_id) { | 760 SpdyStreamId last_good_stream_id) { |
761 SpdyGoAwayIR go_ir(last_good_stream_id, GOAWAY_OK, "go away"); | 761 SpdyGoAwayIR go_ir(last_good_stream_id, GOAWAY_NO_ERROR, "go away"); |
762 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(go_ir)); | 762 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(go_ir)); |
763 } | 763 } |
764 | 764 |
765 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway( | 765 SpdySerializedFrame SpdyTestUtil::ConstructSpdyGoAway( |
766 SpdyStreamId last_good_stream_id, | 766 SpdyStreamId last_good_stream_id, |
767 SpdyGoAwayStatus status, | 767 SpdyGoAwayStatus status, |
768 const std::string& desc) { | 768 const std::string& desc) { |
769 SpdyGoAwayIR go_ir(last_good_stream_id, status, desc); | 769 SpdyGoAwayIR go_ir(last_good_stream_id, status, desc); |
770 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(go_ir)); | 770 return SpdySerializedFrame(headerless_spdy_framer_.SerializeFrame(go_ir)); |
771 } | 771 } |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 headers[GetSchemeKey()] = scheme.c_str(); | 1122 headers[GetSchemeKey()] = scheme.c_str(); |
1123 headers[GetPathKey()] = path.c_str(); | 1123 headers[GetPathKey()] = path.c_str(); |
1124 if (content_length) { | 1124 if (content_length) { |
1125 std::string length_str = base::Int64ToString(*content_length); | 1125 std::string length_str = base::Int64ToString(*content_length); |
1126 headers["content-length"] = length_str; | 1126 headers["content-length"] = length_str; |
1127 } | 1127 } |
1128 return headers; | 1128 return headers; |
1129 } | 1129 } |
1130 | 1130 |
1131 } // namespace net | 1131 } // namespace net |
OLD | NEW |