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 <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 const SpdyStreamId stream_id, uint32 delta_window_size) const { | 914 const SpdyStreamId stream_id, uint32 delta_window_size) const { |
915 SpdyWindowUpdateIR update_ir(stream_id, delta_window_size); | 915 SpdyWindowUpdateIR update_ir(stream_id, delta_window_size); |
916 return CreateFramer(false)->SerializeFrame(update_ir); | 916 return CreateFramer(false)->SerializeFrame(update_ir); |
917 } | 917 } |
918 | 918 |
919 // TODO(jgraettinger): Eliminate uses of this method in tests (prefer | 919 // TODO(jgraettinger): Eliminate uses of this method in tests (prefer |
920 // SpdyRstStreamIR). | 920 // SpdyRstStreamIR). |
921 SpdyFrame* SpdyTestUtil::ConstructSpdyRstStream( | 921 SpdyFrame* SpdyTestUtil::ConstructSpdyRstStream( |
922 SpdyStreamId stream_id, | 922 SpdyStreamId stream_id, |
923 SpdyRstStreamStatus status) const { | 923 SpdyRstStreamStatus status) const { |
924 SpdyRstStreamIR rst_ir(stream_id, status, "RST"); | 924 SpdyRstStreamIR rst_ir(stream_id, status, ""); |
925 return CreateFramer(false)->SerializeRstStream(rst_ir); | 925 return CreateFramer(false)->SerializeRstStream(rst_ir); |
926 } | 926 } |
927 | 927 |
928 SpdyFrame* SpdyTestUtil::ConstructSpdyGet( | 928 SpdyFrame* SpdyTestUtil::ConstructSpdyGet( |
929 const char* const url, | 929 const char* const url, |
930 bool compressed, | 930 bool compressed, |
931 SpdyStreamId stream_id, | 931 SpdyStreamId stream_id, |
932 RequestPriority request_priority) const { | 932 RequestPriority request_priority) const { |
933 const SpdyHeaderInfo header_info = { | 933 const SpdyHeaderInfo header_info = { |
934 SYN_STREAM, | 934 SYN_STREAM, |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 } | 1238 } |
1239 } | 1239 } |
1240 | 1240 |
1241 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1241 void SpdyTestUtil::SetPriority(RequestPriority priority, |
1242 SpdySynStreamIR* ir) const { | 1242 SpdySynStreamIR* ir) const { |
1243 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1243 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
1244 priority, spdy_version())); | 1244 priority, spdy_version())); |
1245 } | 1245 } |
1246 | 1246 |
1247 } // namespace net | 1247 } // namespace net |
OLD | NEW |