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 #include "net/tools/quic/test_tools/quic_test_client.h" | 5 #include "net/tools/quic/test_tools/quic_test_client.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/cert/cert_verify_result.h" | 10 #include "net/cert/cert_verify_result.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 PRIVACY_MODE_DISABLED)); | 248 PRIVACY_MODE_DISABLED)); |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 QuicSpdyClientStream* stream = GetOrCreateStream(); | 252 QuicSpdyClientStream* stream = GetOrCreateStream(); |
253 if (!stream) { return 0; } | 253 if (!stream) { return 0; } |
254 | 254 |
255 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(), | 255 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(), |
256 secure_)); | 256 secure_)); |
257 ssize_t ret = GetOrCreateStream()->SendRequest( | 257 ssize_t ret = GetOrCreateStream()->SendRequest( |
258 munged_headers.get() ? *munged_headers.get() : *message.headers(), | 258 munged_headers.get() ? *munged_headers : *message.headers(), |
259 message.body(), | 259 message.body(), message.has_complete_message()); |
260 message.has_complete_message()); | |
261 WaitForWriteToFlush(); | 260 WaitForWriteToFlush(); |
262 return ret; | 261 return ret; |
263 } | 262 } |
264 | 263 |
265 ssize_t QuicTestClient::SendData(string data, bool last_data) { | 264 ssize_t QuicTestClient::SendData(string data, bool last_data) { |
266 return SendData(data, last_data, nullptr); | 265 return SendData(data, last_data, nullptr); |
267 } | 266 } |
268 | 267 |
269 ssize_t QuicTestClient::SendData(string data, | 268 ssize_t QuicTestClient::SendData(string data, |
270 bool last_data, | 269 bool last_data, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 // Set policy for headers and crypto streams. | 554 // Set policy for headers and crypto streams. |
556 ReliableQuicStreamPeer::SetFecPolicy( | 555 ReliableQuicStreamPeer::SetFecPolicy( |
557 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); | 556 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); |
558 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), | 557 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), |
559 fec_policy); | 558 fec_policy); |
560 } | 559 } |
561 | 560 |
562 } // namespace test | 561 } // namespace test |
563 } // namespace tools | 562 } // namespace tools |
564 } // namespace net | 563 } // namespace net |
OLD | NEW |