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

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

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments 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 | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_pool_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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698