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

Side by Side Diff: net/http/http_proxy_client_socket_pool_spdy21_unittest.cc

Issue 9959033: Move NextProto enum to a new file net/socket/next_proto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address wtc's comments Created 8 years, 8 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
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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (GetParam() != HTTP) { 168 if (GetParam() != HTTP) {
169 ssl_data_.reset(new SSLSocketDataProvider(SYNCHRONOUS, OK)); 169 ssl_data_.reset(new SSLSocketDataProvider(SYNCHRONOUS, OK));
170 if (GetParam() == SPDY) { 170 if (GetParam() == SPDY) {
171 InitializeSpdySsl(); 171 InitializeSpdySsl();
172 } 172 }
173 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get()); 173 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get());
174 } 174 }
175 } 175 }
176 176
177 void InitializeSpdySsl() { 177 void InitializeSpdySsl() {
178 ssl_data_->SetNextProto(SSLClientSocket::kProtoSPDY21); 178 ssl_data_->SetNextProto(kProtoSPDY21);
179 } 179 }
180 180
181 HttpNetworkSession* CreateNetworkSession() { 181 HttpNetworkSession* CreateNetworkSession() {
182 HttpNetworkSession::Params params; 182 HttpNetworkSession::Params params;
183 params.host_resolver = &host_resolver_; 183 params.host_resolver = &host_resolver_;
184 params.cert_verifier = cert_verifier_.get(); 184 params.cert_verifier = cert_verifier_.get();
185 params.proxy_service = proxy_service_.get(); 185 params.proxy_service = proxy_service_.get();
186 params.client_socket_factory = &socket_factory_; 186 params.client_socket_factory = &socket_factory_;
187 params.ssl_config_service = ssl_config_service_; 187 params.ssl_config_service = ssl_config_service_;
188 params.http_auth_handler_factory = http_auth_handler_factory_.get(); 188 params.http_auth_handler_factory = http_auth_handler_factory_.get();
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // HTTPS or SPDY Proxy CONNECT responses are trustworthy 533 // HTTPS or SPDY Proxy CONNECT responses are trustworthy
534 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); 534 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv);
535 EXPECT_TRUE(handle_.is_initialized()); 535 EXPECT_TRUE(handle_.is_initialized());
536 EXPECT_TRUE(handle_.socket()); 536 EXPECT_TRUE(handle_.socket());
537 } 537 }
538 } 538 }
539 539
540 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 540 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
541 541
542 } // namespace net 542 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/http/http_proxy_client_socket_pool_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698