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

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

Issue 217053010: Revert of Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) { 209 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) {
210 stream_ = NULL; // Always force creation of a stream for SendMessage. 210 stream_ = NULL; // Always force creation of a stream for SendMessage.
211 211
212 // If we're not connected, try to find an sni hostname. 212 // If we're not connected, try to find an sni hostname.
213 if (!connected()) { 213 if (!connected()) {
214 GURL url(message.headers()->request_uri().as_string()); 214 GURL url(message.headers()->request_uri().as_string());
215 if (!url.host().empty()) { 215 if (!url.host().empty()) {
216 client_->set_server_key( 216 client_->set_server_key(
217 QuicSessionKey(url.host(), url.EffectiveIntPort(), 217 QuicSessionKey(url.host(), url.EffectiveIntPort(),
218 url.SchemeIs("https"), PRIVACY_MODE_DISABLED)); 218 url.SchemeIs("https"), kPrivacyModeDisabled));
219 } 219 }
220 } 220 }
221 221
222 QuicSpdyClientStream* stream = GetOrCreateStream(); 222 QuicSpdyClientStream* stream = GetOrCreateStream();
223 if (!stream) { return 0; } 223 if (!stream) { return 0; }
224 224
225 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(), 225 scoped_ptr<BalsaHeaders> munged_headers(MungeHeaders(message.headers(),
226 secure_)); 226 secure_));
227 ssize_t ret = GetOrCreateStream()->SendRequest( 227 ssize_t ret = GetOrCreateStream()->SendRequest(
228 munged_headers.get() ? *munged_headers.get() : *message.headers(), 228 munged_headers.get() ? *munged_headers.get() : *message.headers(),
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 void QuicTestClient::WaitForWriteToFlush() { 460 void QuicTestClient::WaitForWriteToFlush() {
461 while (connected() && client()->session()->HasDataToWrite()) { 461 while (connected() && client()->session()->HasDataToWrite()) {
462 client_->WaitForEvents(); 462 client_->WaitForEvents();
463 } 463 }
464 } 464 }
465 465
466 } // namespace test 466 } // namespace test
467 } // namespace tools 467 } // namespace tools
468 } // namespace net 468 } // 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