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

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

Issue 215023002: Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | net/url_request/url_request_http_job.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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) { 236 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) {
237 stream_ = NULL; // Always force creation of a stream for SendMessage. 237 stream_ = NULL; // Always force creation of a stream for SendMessage.
238 238
239 // If we're not connected, try to find an sni hostname. 239 // If we're not connected, try to find an sni hostname.
240 if (!connected()) { 240 if (!connected()) {
241 GURL url(message.headers()->request_uri().as_string()); 241 GURL url(message.headers()->request_uri().as_string());
242 if (!url.host().empty()) { 242 if (!url.host().empty()) {
243 client_->set_server_key( 243 client_->set_server_key(
244 QuicSessionKey(url.host(), url.EffectiveIntPort(), 244 QuicSessionKey(url.host(), url.EffectiveIntPort(),
245 url.SchemeIs("https"), kPrivacyModeDisabled)); 245 url.SchemeIs("https"), PRIVACY_MODE_DISABLED));
246 } 246 }
247 } 247 }
248 248
249 QuicSpdyClientStream* stream = GetOrCreateStream(); 249 QuicSpdyClientStream* stream = GetOrCreateStream();
250 if (!stream) { return 0; } 250 if (!stream) { return 0; }
251 251
252 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(), 252 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(),
253 secure_)); 253 secure_));
254 ssize_t ret = GetOrCreateStream()->SendRequest( 254 ssize_t ret = GetOrCreateStream()->SendRequest(
255 munged_headers.get() ? *munged_headers.get() : *message.headers(), 255 munged_headers.get() ? *munged_headers.get() : *message.headers(),
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 void QuicTestClient::WaitForWriteToFlush() { 487 void QuicTestClient::WaitForWriteToFlush() {
488 while (connected() && client()->session()->HasDataToWrite()) { 488 while (connected() && client()->session()->HasDataToWrite()) {
489 client_->WaitForEvents(); 489 client_->WaitForEvents();
490 } 490 }
491 } 491 }
492 492
493 } // namespace test 493 } // namespace test
494 } // namespace tools 494 } // namespace tools
495 } // namespace net 495 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698