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

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

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TFO not enabled when Happy Eyeballs may be used. Created 6 years, 3 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 AuthCredentials(kFoo, kBar), 113 AuthCredentials(kFoo, kBar),
114 "/"); 114 "/");
115 } 115 }
116 116
117 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const { 117 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const {
118 if (GetParam().proxy_type != HTTP) 118 if (GetParam().proxy_type != HTTP)
119 return NULL; 119 return NULL;
120 return new TransportSocketParams(HostPortPair(kHttpProxyHost, 80), 120 return new TransportSocketParams(HostPortPair(kHttpProxyHost, 80),
121 false, 121 false,
122 false, 122 false,
123 OnHostResolutionCallback()); 123 OnHostResolutionCallback(),
124 AUTO_CONNECT_USE_DEFAULT);
124 } 125 }
125 126
126 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { 127 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const {
127 if (GetParam().proxy_type == HTTP) 128 if (GetParam().proxy_type == HTTP)
128 return NULL; 129 return NULL;
129 return new SSLSocketParams( 130 return new SSLSocketParams(
130 new TransportSocketParams( 131 new TransportSocketParams(
131 HostPortPair(kHttpsProxyHost, 443), 132 HostPortPair(kHttpsProxyHost, 443),
132 false, 133 false,
133 false, 134 false,
134 OnHostResolutionCallback()), 135 OnHostResolutionCallback(),
136 AUTO_CONNECT_USE_DEFAULT),
135 NULL, 137 NULL,
136 NULL, 138 NULL,
137 HostPortPair(kHttpsProxyHost, 443), 139 HostPortPair(kHttpsProxyHost, 443),
138 SSLConfig(), 140 SSLConfig(),
139 PRIVACY_MODE_DISABLED, 141 PRIVACY_MODE_DISABLED,
140 0, 142 0,
141 false, 143 false,
142 false); 144 false);
143 } 145 }
144 146
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 EXPECT_TRUE(headers->IsRedirect(&location)); 715 EXPECT_TRUE(headers->IsRedirect(&location));
714 EXPECT_EQ(location, redirectTarget); 716 EXPECT_EQ(location, redirectTarget);
715 } 717 }
716 } 718 }
717 719
718 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 720 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
719 721
720 } // namespace 722 } // namespace
721 723
722 } // namespace net 724 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698