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

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: Added test and addressed comments. 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 "MyRealm1", 110 "MyRealm1",
111 HttpAuth::AUTH_SCHEME_BASIC, 111 HttpAuth::AUTH_SCHEME_BASIC,
112 "Basic realm=MyRealm1", 112 "Basic realm=MyRealm1",
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(
121 false, 121 HostPortPair(kHttpProxyHost, 80),
122 false, 122 false,
123 OnHostResolutionCallback()); 123 false,
124 OnHostResolutionCallback(),
125 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT);
124 } 126 }
125 127
126 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { 128 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const {
127 if (GetParam().proxy_type == HTTP) 129 if (GetParam().proxy_type == HTTP)
128 return NULL; 130 return NULL;
129 return new SSLSocketParams( 131 return new SSLSocketParams(
130 new TransportSocketParams( 132 new TransportSocketParams(
131 HostPortPair(kHttpsProxyHost, 443), 133 HostPortPair(kHttpsProxyHost, 443),
132 false, 134 false,
133 false, 135 false,
134 OnHostResolutionCallback()), 136 OnHostResolutionCallback(),
137 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT),
135 NULL, 138 NULL,
136 NULL, 139 NULL,
137 HostPortPair(kHttpsProxyHost, 443), 140 HostPortPair(kHttpsProxyHost, 443),
138 SSLConfig(), 141 SSLConfig(),
139 PRIVACY_MODE_DISABLED, 142 PRIVACY_MODE_DISABLED,
140 0, 143 0,
141 false, 144 false,
142 false); 145 false);
143 } 146 }
144 147
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 EXPECT_TRUE(headers->IsRedirect(&location)); 716 EXPECT_TRUE(headers->IsRedirect(&location));
714 EXPECT_EQ(location, redirectTarget); 717 EXPECT_EQ(location, redirectTarget);
715 } 718 }
716 } 719 }
717 720
718 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 721 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
719 722
720 } // namespace 723 } // namespace
721 724
722 } // namespace net 725 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/net.gypi » ('j') | net/socket/tcp_socket.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698