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

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

Issue 3123009: More uninitialized class member vars.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « no previous file | net/socket/tcp_client_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) 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 if (read_data_.async) { 307 if (read_data_.async) {
308 DCHECK(callback); 308 DCHECK(callback);
309 RunCallbackAsync(callback, result); 309 RunCallbackAsync(callback, result);
310 return net::ERR_IO_PENDING; 310 return net::ERR_IO_PENDING;
311 } 311 }
312 return result; 312 return result;
313 } 313 }
314 314
315 class MockSSLClientSocket::ConnectCallback : 315 class MockSSLClientSocket::ConnectCallback
316 public net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback> { 316 : public net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback> {
317 public: 317 public:
318 ConnectCallback(MockSSLClientSocket *ssl_client_socket, 318 ConnectCallback(MockSSLClientSocket *ssl_client_socket,
319 net::CompletionCallback* user_callback, 319 net::CompletionCallback* user_callback,
320 int rv) 320 int rv)
321 : ALLOW_THIS_IN_INITIALIZER_LIST( 321 : ALLOW_THIS_IN_INITIALIZER_LIST(
322 net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback>( 322 net::CompletionCallbackImpl<MockSSLClientSocket::ConnectCallback>(
323 this, &ConnectCallback::Wrapper)), 323 this, &ConnectCallback::Wrapper)),
324 ssl_client_socket_(ssl_client_socket), 324 ssl_client_socket_(ssl_client_socket),
325 user_callback_(user_callback), 325 user_callback_(user_callback),
326 rv_(rv) { 326 rv_(rv) {
(...skipping 13 matching lines...) Expand all
340 }; 340 };
341 341
342 MockSSLClientSocket::MockSSLClientSocket( 342 MockSSLClientSocket::MockSSLClientSocket(
343 net::ClientSocketHandle* transport_socket, 343 net::ClientSocketHandle* transport_socket,
344 const std::string& hostname, 344 const std::string& hostname,
345 const net::SSLConfig& ssl_config, 345 const net::SSLConfig& ssl_config,
346 net::SSLSocketDataProvider* data) 346 net::SSLSocketDataProvider* data)
347 : MockClientSocket(transport_socket->socket()->NetLog().net_log()), 347 : MockClientSocket(transport_socket->socket()->NetLog().net_log()),
348 transport_(transport_socket), 348 transport_(transport_socket),
349 data_(data), 349 data_(data),
350 is_npn_state_set_(false) { 350 is_npn_state_set_(false),
351 new_npn_value_(false) {
351 DCHECK(data_); 352 DCHECK(data_);
352 } 353 }
353 354
354 MockSSLClientSocket::~MockSSLClientSocket() { 355 MockSSLClientSocket::~MockSSLClientSocket() {
355 Disconnect(); 356 Disconnect();
356 } 357 }
357 358
358 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) { 359 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) {
359 ConnectCallback* connect_callback = new ConnectCallback( 360 ConnectCallback* connect_callback = new ConnectCallback(
360 this, callback, data_->connect.result); 361 this, callback, data_->connect.result);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 901
901 const char kSOCKS5OkRequest[] = 902 const char kSOCKS5OkRequest[] =
902 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 903 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
903 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 904 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
904 905
905 const char kSOCKS5OkResponse[] = 906 const char kSOCKS5OkResponse[] =
906 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 907 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
907 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 908 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
908 909
909 } // namespace net 910 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698