Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/test_tools/http_message.cc ('k') | net/udp/udp_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/http_message.cc ('k') | net/udp/udp_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698