OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 NOTREACHED(); | 690 NOTREACHED(); |
691 return ERR_NOT_IMPLEMENTED; | 691 return ERR_NOT_IMPLEMENTED; |
692 } | 692 } |
693 | 693 |
694 SSLClientSocket::NextProtoStatus | 694 SSLClientSocket::NextProtoStatus |
695 MockClientSocket::GetNextProto(std::string* proto) { | 695 MockClientSocket::GetNextProto(std::string* proto) { |
696 proto->clear(); | 696 proto->clear(); |
697 return SSLClientSocket::kNextProtoUnsupported; | 697 return SSLClientSocket::kNextProtoUnsupported; |
698 } | 698 } |
699 | 699 |
| 700 bool MockClientSocket::WasOriginBoundCertNegotiated() { |
| 701 return false; |
| 702 } |
| 703 |
700 MockClientSocket::~MockClientSocket() {} | 704 MockClientSocket::~MockClientSocket() {} |
701 | 705 |
702 void MockClientSocket::RunCallbackAsync(net::OldCompletionCallback* callback, | 706 void MockClientSocket::RunCallbackAsync(net::OldCompletionCallback* callback, |
703 int result) { | 707 int result) { |
704 MessageLoop::current()->PostTask(FROM_HERE, | 708 MessageLoop::current()->PostTask(FROM_HERE, |
705 method_factory_.NewRunnableMethod( | 709 method_factory_.NewRunnableMethod( |
706 &MockClientSocket::RunCallback, callback, result)); | 710 &MockClientSocket::RunCallback, callback, result)); |
707 } | 711 } |
708 | 712 |
709 void MockClientSocket::RunCallback(net::OldCompletionCallback* callback, | 713 void MockClientSocket::RunCallback(net::OldCompletionCallback* callback, |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 | 1610 |
1607 const char kSOCKS5OkRequest[] = | 1611 const char kSOCKS5OkRequest[] = |
1608 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1612 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
1609 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1613 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
1610 | 1614 |
1611 const char kSOCKS5OkResponse[] = | 1615 const char kSOCKS5OkResponse[] = |
1612 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1616 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
1613 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1617 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
1614 | 1618 |
1615 } // namespace net | 1619 } // namespace net |
OLD | NEW |