| OLD | NEW |
| 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/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 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 230 |
| 231 void DynamicSocketDataProvider::SimulateRead(const char* data, | 231 void DynamicSocketDataProvider::SimulateRead(const char* data, |
| 232 const size_t length) { | 232 const size_t length) { |
| 233 if (!allow_unconsumed_reads_) { | 233 if (!allow_unconsumed_reads_) { |
| 234 EXPECT_TRUE(reads_.empty()) << "Unconsumed read: " << reads_.front().data; | 234 EXPECT_TRUE(reads_.empty()) << "Unconsumed read: " << reads_.front().data; |
| 235 } | 235 } |
| 236 reads_.push_back(MockRead(true, data, length)); | 236 reads_.push_back(MockRead(true, data, length)); |
| 237 } | 237 } |
| 238 | 238 |
| 239 SSLSocketDataProvider::SSLSocketDataProvider(bool async, int result) | 239 SSLSocketDataProvider::SSLSocketDataProvider(bool async, int result) |
| 240 : connect(async, result), | 240 : connect(async ? ASYNC : SYNCHRONOUS, result), |
| 241 next_proto_status(SSLClientSocket::kNextProtoUnsupported), | 241 next_proto_status(SSLClientSocket::kNextProtoUnsupported), |
| 242 was_npn_negotiated(false), | 242 was_npn_negotiated(false), |
| 243 protocol_negotiated(SSLClientSocket::kProtoUnknown), | 243 protocol_negotiated(SSLClientSocket::kProtoUnknown), |
| 244 client_cert_sent(false), | 244 client_cert_sent(false), |
| 245 cert_request_info(NULL), | 245 cert_request_info(NULL), |
| 246 origin_bound_cert_type(CLIENT_CERT_INVALID_TYPE) { | 246 origin_bound_cert_type(CLIENT_CERT_INVALID_TYPE) { |
| 247 } | 247 } |
| 248 | 248 |
| 249 SSLSocketDataProvider::~SSLSocketDataProvider() { | 249 SSLSocketDataProvider::~SSLSocketDataProvider() { |
| 250 } | 250 } |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 | 1612 |
| 1613 const char kSOCKS5OkRequest[] = | 1613 const char kSOCKS5OkRequest[] = |
| 1614 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1614 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1615 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1615 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1616 | 1616 |
| 1617 const char kSOCKS5OkResponse[] = | 1617 const char kSOCKS5OkResponse[] = |
| 1618 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1618 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1619 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1619 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1620 | 1620 |
| 1621 } // namespace net | 1621 } // namespace net |
| OLD | NEW |