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

Side by Side Diff: chrome/browser/net/preconnect.cc

Issue 3174004: Pass both hostname and port into SSLClientSocket (Closed)
Patch Set: 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
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 "chrome/browser/net/preconnect.h" 5 #include "chrome/browser/net/preconnect.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 group_name = StringPrintf("ssl/%s", group_name.c_str()); 131 group_name = StringPrintf("ssl/%s", group_name.c_str());
132 132
133 net::SSLConfig ssl_config; 133 net::SSLConfig ssl_config;
134 session->ssl_config_service()->GetSSLConfig(&ssl_config); 134 session->ssl_config_service()->GetSSLConfig(&ssl_config);
135 // All preconnects should be for main pages. 135 // All preconnects should be for main pages.
136 ssl_config.verify_ev_cert = true; 136 ssl_config.verify_ev_cert = true;
137 137
138 scoped_refptr<net::SSLSocketParams> ssl_params = 138 scoped_refptr<net::SSLSocketParams> ssl_params =
139 new net::SSLSocketParams(tcp_params, NULL, NULL, 139 new net::SSLSocketParams(tcp_params, NULL, NULL,
140 net::ProxyServer::SCHEME_DIRECT, 140 net::ProxyServer::SCHEME_DIRECT,
141 url.HostNoBrackets(), ssl_config, 141 endpoint, ssl_config,
142 0, false, false); 142 0, false, false);
143 143
144 const scoped_refptr<net::SSLClientSocketPool>& pool = 144 const scoped_refptr<net::SSLClientSocketPool>& pool =
145 session->ssl_socket_pool(); 145 session->ssl_socket_pool();
146 146
147 rv = handle_.Init(group_name, ssl_params, priority, this, pool, 147 rv = handle_.Init(group_name, ssl_params, priority, this, pool,
148 net::BoundNetLog()); 148 net::BoundNetLog());
149 } else { 149 } else {
150 const scoped_refptr<net::TCPClientSocketPool>& pool = 150 const scoped_refptr<net::TCPClientSocketPool>& pool =
151 session->tcp_socket_pool(); 151 session->tcp_socket_pool();
152 rv = handle_.Init(group_name, tcp_params, priority, this, pool, 152 rv = handle_.Init(group_name, tcp_params, priority, this, pool,
153 net::BoundNetLog()); 153 net::BoundNetLog());
154 } 154 }
155 155
156 if (rv != net::ERR_IO_PENDING) 156 if (rv != net::ERR_IO_PENDING)
157 Release(); // There will be no callback. 157 Release(); // There will be no callback.
158 } 158 }
159 159
160 void Preconnect::RunWithParams(const Tuple1<int>& params) { 160 void Preconnect::RunWithParams(const Tuple1<int>& params) {
161 if (params.a < 0 && handle_.socket()) 161 if (params.a < 0 && handle_.socket())
162 handle_.socket()->Disconnect(); 162 handle_.socket()->Disconnect();
163 Release(); 163 Release();
164 } 164 }
165 } // chrome_browser_net 165 } // chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/ssl_client_certificate_selector.mm ('k') | jingle/notifier/base/chrome_async_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698