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

Side by Side Diff: net/socket/socket_test_util.cc

Issue 6120003: Unit test for testing SSL client auth with both a proxy and an SSL endpoint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/socket/socket_test_util.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 10
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 MockSSLClientSocket::MockSSLClientSocket( 467 MockSSLClientSocket::MockSSLClientSocket(
468 net::ClientSocketHandle* transport_socket, 468 net::ClientSocketHandle* transport_socket,
469 const HostPortPair& host_port_pair, 469 const HostPortPair& host_port_pair,
470 const net::SSLConfig& ssl_config, 470 const net::SSLConfig& ssl_config,
471 SSLHostInfo* ssl_host_info, 471 SSLHostInfo* ssl_host_info,
472 net::SSLSocketDataProvider* data) 472 net::SSLSocketDataProvider* data)
473 : MockClientSocket(transport_socket->socket()->NetLog().net_log()), 473 : MockClientSocket(transport_socket->socket()->NetLog().net_log()),
474 transport_(transport_socket), 474 transport_(transport_socket),
475 data_(data), 475 data_(data),
476 is_npn_state_set_(false), 476 is_npn_state_set_(false),
477 new_npn_value_(false) { 477 new_npn_value_(false),
478 was_used_to_convey_data_(false),
479 host_and_port_(host_port_pair),
480 ssl_config_(ssl_config) {
478 DCHECK(data_); 481 DCHECK(data_);
479 delete ssl_host_info; // we take ownership but don't use it. 482 delete ssl_host_info; // we take ownership but don't use it.
480 } 483 }
481 484
482 MockSSLClientSocket::~MockSSLClientSocket() { 485 MockSSLClientSocket::~MockSSLClientSocket() {
483 Disconnect(); 486 Disconnect();
484 } 487 }
485 488
486 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) { 489 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) {
487 ConnectCallback* connect_callback = new ConnectCallback( 490 ConnectCallback* connect_callback = new ConnectCallback(
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1295
1293 const char kSOCKS5OkRequest[] = 1296 const char kSOCKS5OkRequest[] =
1294 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 1297 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
1295 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 1298 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
1296 1299
1297 const char kSOCKS5OkResponse[] = 1300 const char kSOCKS5OkResponse[] =
1298 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 1301 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
1299 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 1302 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
1300 1303
1301 } // namespace net 1304 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698