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

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

Issue 1157333005: [net/http auth] Use strings to identify authentication schemes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « net/net.gypi ('k') | net/spdy/spdy_proxy_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) 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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 : NULL, 144 : NULL,
145 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, 145 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL,
146 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, 146 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL,
147 HostPortPair("host", 443), ssl_config_, PRIVACY_MODE_DISABLED, 0, 147 HostPortPair("host", 443), ssl_config_, PRIVACY_MODE_DISABLED, 0,
148 expect_spdy)); 148 expect_spdy));
149 } 149 }
150 150
151 void AddAuthToCache() { 151 void AddAuthToCache() {
152 const base::string16 kFoo(base::ASCIIToUTF16("foo")); 152 const base::string16 kFoo(base::ASCIIToUTF16("foo"));
153 const base::string16 kBar(base::ASCIIToUTF16("bar")); 153 const base::string16 kBar(base::ASCIIToUTF16("bar"));
154 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), 154 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), "MyRealm1",
155 "MyRealm1", 155 "basic", "Basic realm=MyRealm1",
156 HttpAuth::AUTH_SCHEME_BASIC, 156 AuthCredentials(kFoo, kBar), "/");
157 "Basic realm=MyRealm1",
158 AuthCredentials(kFoo, kBar),
159 "/");
160 } 157 }
161 158
162 HttpNetworkSession* CreateNetworkSession() { 159 HttpNetworkSession* CreateNetworkSession() {
163 HttpNetworkSession::Params params; 160 HttpNetworkSession::Params params;
164 params.host_resolver = &host_resolver_; 161 params.host_resolver = &host_resolver_;
165 params.cert_verifier = cert_verifier_.get(); 162 params.cert_verifier = cert_verifier_.get();
166 params.transport_security_state = transport_security_state_.get(); 163 params.transport_security_state = transport_security_state_.get();
167 params.proxy_service = proxy_service_.get(); 164 params.proxy_service = proxy_service_.get();
168 params.client_socket_factory = &socket_factory_; 165 params.client_socket_factory = &socket_factory_;
169 params.ssl_config_service = ssl_config_service_.get(); 166 params.ssl_config_service = ssl_config_service_.get();
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 ssl.channel_id_sent = true; 909 ssl.channel_id_sent = true;
913 ssl.SetNextProto(GetParam()); 910 ssl.SetNextProto(GetParam());
914 TestIPPoolingDisabled(&ssl); 911 TestIPPoolingDisabled(&ssl);
915 } 912 }
916 913
917 // It would be nice to also test the timeouts in SSLClientSocketPool. 914 // It would be nice to also test the timeouts in SSLClientSocketPool.
918 915
919 } // namespace 916 } // namespace
920 917
921 } // namespace net 918 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/spdy/spdy_proxy_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698