| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/quic/chromium/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 void SendRequestHeaders() { | 173 void SendRequestHeaders() { |
| 174 not_expect_callback_ = true; | 174 not_expect_callback_ = true; |
| 175 stream_->SendRequestHeaders(); | 175 stream_->SendRequestHeaders(); |
| 176 not_expect_callback_ = false; | 176 not_expect_callback_ = false; |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SendData(const scoped_refptr<IOBuffer>& data, | 179 void SendData(const scoped_refptr<IOBuffer>& data, |
| 180 int length, | 180 int length, |
| 181 bool end_of_stream) { | 181 bool end_of_stream) { |
| 182 not_expect_callback_ = true; | 182 SendvData({data}, {length}, end_of_stream); |
| 183 stream_->SendData(data, length, end_of_stream); | |
| 184 not_expect_callback_ = false; | |
| 185 } | 183 } |
| 186 | 184 |
| 187 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& data, | 185 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& data, |
| 188 const std::vector<int>& lengths, | 186 const std::vector<int>& lengths, |
| 189 bool end_of_stream) { | 187 bool end_of_stream) { |
| 190 not_expect_callback_ = true; | 188 not_expect_callback_ = true; |
| 191 stream_->SendvData(data, lengths, end_of_stream); | 189 stream_->SendvData(data, lengths, end_of_stream); |
| 192 not_expect_callback_ = false; | 190 not_expect_callback_ = false; |
| 193 } | 191 } |
| 194 | 192 |
| (...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 | 2116 |
| 2119 base::RunLoop().RunUntilIdle(); | 2117 base::RunLoop().RunUntilIdle(); |
| 2120 | 2118 |
| 2121 EXPECT_EQ(1, delegate->on_data_read_count()); | 2119 EXPECT_EQ(1, delegate->on_data_read_count()); |
| 2122 EXPECT_EQ(0, delegate->on_data_sent_count()); | 2120 EXPECT_EQ(0, delegate->on_data_sent_count()); |
| 2123 } | 2121 } |
| 2124 | 2122 |
| 2125 } // namespace test | 2123 } // namespace test |
| 2126 | 2124 |
| 2127 } // namespace net | 2125 } // namespace net |
| OLD | NEW |