OLD | NEW |
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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 } | 913 } |
914 | 914 |
915 int MockHttpAuthController::HandleAuthChallenge( | 915 int MockHttpAuthController::HandleAuthChallenge( |
916 scoped_refptr<HttpResponseHeaders> headers, | 916 scoped_refptr<HttpResponseHeaders> headers, |
917 bool do_not_send_server_auth, | 917 bool do_not_send_server_auth, |
918 bool establishing_tunnel, | 918 bool establishing_tunnel, |
919 const BoundNetLog& net_log) { | 919 const BoundNetLog& net_log) { |
920 return OK; | 920 return OK; |
921 } | 921 } |
922 | 922 |
923 void MockHttpAuthController::ResetAuth(const std::wstring& username, | 923 void MockHttpAuthController::ResetAuth(const string16& username, |
924 const std::wstring& password) { | 924 const string16& password) { |
925 data_index_++; | 925 data_index_++; |
926 } | 926 } |
927 | 927 |
928 bool MockHttpAuthController::HaveAuth() const { | 928 bool MockHttpAuthController::HaveAuth() const { |
929 return CurrentData().auth_header.size() != 0; | 929 return CurrentData().auth_header.size() != 0; |
930 } | 930 } |
931 | 931 |
932 bool MockHttpAuthController::HaveAuthHandler() const { | 932 bool MockHttpAuthController::HaveAuthHandler() const { |
933 return HaveAuth(); | 933 return HaveAuth(); |
934 } | 934 } |
935 | 935 |
936 const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; | 936 const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; |
937 const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest); | 937 const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest); |
938 | 938 |
939 const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; | 939 const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; |
940 const int kSOCKS5GreetResponseLength = arraysize(kSOCKS5GreetResponse); | 940 const int kSOCKS5GreetResponseLength = arraysize(kSOCKS5GreetResponse); |
941 | 941 |
942 const char kSOCKS5OkRequest[] = | 942 const char kSOCKS5OkRequest[] = |
943 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 943 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
944 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 944 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
945 | 945 |
946 const char kSOCKS5OkResponse[] = | 946 const char kSOCKS5OkResponse[] = |
947 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 947 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
948 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 948 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
949 | 949 |
950 } // namespace net | 950 } // namespace net |
OLD | NEW |