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

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 9618002: SPDY - integration of spdy/3 code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/socket/ssl_client_socket.cc ('k') | net/spdy/buffered_spdy_framer.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/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if (status == SSLClientSocket::kNextProtoNegotiated) { 296 if (status == SSLClientSocket::kNextProtoNegotiated) {
297 ssl_socket_->set_was_npn_negotiated(true); 297 ssl_socket_->set_was_npn_negotiated(true);
298 SSLClientSocket::NextProto protocol_negotiated = 298 SSLClientSocket::NextProto protocol_negotiated =
299 SSLClientSocket::NextProtoFromString(proto); 299 SSLClientSocket::NextProtoFromString(proto);
300 ssl_socket_->set_protocol_negotiated(protocol_negotiated); 300 ssl_socket_->set_protocol_negotiated(protocol_negotiated);
301 // If we negotiated either version of SPDY, we must have 301 // If we negotiated either version of SPDY, we must have
302 // advertised it, so allow it. 302 // advertised it, so allow it.
303 // TODO(mbelshe): verify it was a protocol we advertised? 303 // TODO(mbelshe): verify it was a protocol we advertised?
304 if (protocol_negotiated == SSLClientSocket::kProtoSPDY1 || 304 if (protocol_negotiated == SSLClientSocket::kProtoSPDY1 ||
305 protocol_negotiated == SSLClientSocket::kProtoSPDY2 || 305 protocol_negotiated == SSLClientSocket::kProtoSPDY2 ||
306 protocol_negotiated == SSLClientSocket::kProtoSPDY21) { 306 protocol_negotiated == SSLClientSocket::kProtoSPDY21 ||
307 protocol_negotiated == SSLClientSocket::kProtoSPDY3) {
307 ssl_socket_->set_was_spdy_negotiated(true); 308 ssl_socket_->set_was_spdy_negotiated(true);
308 } 309 }
309 } 310 }
310 if (params_->want_spdy_over_npn() && !ssl_socket_->was_spdy_negotiated()) 311 if (params_->want_spdy_over_npn() && !ssl_socket_->was_spdy_negotiated())
311 return ERR_NPN_NEGOTIATION_FAILED; 312 return ERR_NPN_NEGOTIATION_FAILED;
312 313
313 // Spdy might be turned on by default, or it might be over npn. 314 // Spdy might be turned on by default, or it might be over npn.
314 bool using_spdy = params_->force_spdy_over_ssl() || 315 bool using_spdy = params_->force_spdy_over_ssl() ||
315 params_->want_spdy_over_npn(); 316 params_->want_spdy_over_npn();
316 317
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 585
585 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { 586 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const {
586 return base_.histograms(); 587 return base_.histograms();
587 } 588 }
588 589
589 void SSLClientSocketPool::OnSSLConfigChanged() { 590 void SSLClientSocketPool::OnSSLConfigChanged() {
590 Flush(); 591 Flush();
591 } 592 }
592 593
593 } // namespace net 594 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket.cc ('k') | net/spdy/buffered_spdy_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698