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

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

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/buffered_write_stream_socket.h » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 if (result < 0) { 232 if (result < 0) {
233 if (transport_socket_handle_->socket()) 233 if (transport_socket_handle_->socket())
234 transport_socket_handle_->socket()->Disconnect(); 234 transport_socket_handle_->socket()->Disconnect();
235 return ERR_PROXY_CONNECTION_FAILED; 235 return ERR_PROXY_CONNECTION_FAILED;
236 } 236 }
237 237
238 SSLClientSocket* ssl = 238 SSLClientSocket* ssl =
239 static_cast<SSLClientSocket*>(transport_socket_handle_->socket()); 239 static_cast<SSLClientSocket*>(transport_socket_handle_->socket());
240 using_spdy_ = ssl->was_spdy_negotiated(); 240 using_spdy_ = ssl->was_spdy_negotiated();
241 protocol_negotiated_ = ssl->protocol_negotiated(); 241 protocol_negotiated_ = ssl->GetNegotiatedProtocol();
242 242
243 // Reset the timer to just the length of time allowed for HttpProxy handshake 243 // Reset the timer to just the length of time allowed for HttpProxy handshake
244 // so that a fast SSL connection plus a slow HttpProxy failure doesn't take 244 // so that a fast SSL connection plus a slow HttpProxy failure doesn't take
245 // longer to timeout than it should. 245 // longer to timeout than it should.
246 ResetTimer(base::TimeDelta::FromSeconds( 246 ResetTimer(base::TimeDelta::FromSeconds(
247 kHttpProxyConnectJobTimeoutInSeconds)); 247 kHttpProxyConnectJobTimeoutInSeconds));
248 // TODO(rch): If we ever decide to implement a "trusted" SPDY proxy 248 // TODO(rch): If we ever decide to implement a "trusted" SPDY proxy
249 // (one that we speak SPDY over SSL to, but to which we send HTTPS 249 // (one that we speak SPDY over SSL to, but to which we send HTTPS
250 // request directly instead of through CONNECT tunnels, then we 250 // request directly instead of through CONNECT tunnels, then we
251 // need to add a predicate to this if statement so we fall through 251 // need to add a predicate to this if statement so we fall through
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 return base_.histograms(); 512 return base_.histograms();
513 } 513 }
514 514
515 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { 515 bool HttpProxyClientSocketPool::CloseOneIdleConnection() {
516 if (base_.CloseOneIdleSocket()) 516 if (base_.CloseOneIdleSocket())
517 return true; 517 return true;
518 return base_.CloseOneIdleConnectionInLayeredPool(); 518 return base_.CloseOneIdleConnectionInLayeredPool();
519 } 519 }
520 520
521 } // namespace net 521 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/buffered_write_stream_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698