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

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

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 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/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 FROM_HERE_WITH_EXPLICIT_FUNCTION( 328 FROM_HERE_WITH_EXPLICIT_FUNCTION(
329 "462784 SSLConnectJob::DoSSLConnectComplete")); 329 "462784 SSLConnectJob::DoSSLConnectComplete"));
330 330
331 connect_timing_.ssl_end = base::TimeTicks::Now(); 331 connect_timing_.ssl_end = base::TimeTicks::Now();
332 332
333 if (result != OK && !server_address_.address().empty()) { 333 if (result != OK && !server_address_.address().empty()) {
334 connection_attempts_.push_back(ConnectionAttempt(server_address_, result)); 334 connection_attempts_.push_back(ConnectionAttempt(server_address_, result));
335 server_address_ = IPEndPoint(); 335 server_address_ = IPEndPoint();
336 } 336 }
337 337
338 // If we want SPDY over ALPN/NPN, make sure it succeeded. 338 // If we want SPDY over ALPN, make sure it succeeded.
339 if (params_->expect_spdy() && 339 if (params_->expect_spdy() &&
340 ssl_socket_->GetNegotiatedProtocol() != kProtoHTTP2) { 340 ssl_socket_->GetNegotiatedProtocol() != kProtoHTTP2) {
341 return ERR_NPN_NEGOTIATION_FAILED; 341 return ERR_ALPN_NEGOTIATION_FAILED;
342 } 342 }
343 343
344 if (result == OK || 344 if (result == OK ||
345 ssl_socket_->IgnoreCertError(result, params_->load_flags())) { 345 ssl_socket_->IgnoreCertError(result, params_->load_flags())) {
346 DCHECK(!connect_timing_.ssl_start.is_null()); 346 DCHECK(!connect_timing_.ssl_start.is_null());
347 base::TimeDelta connect_duration = 347 base::TimeDelta connect_duration =
348 connect_timing_.ssl_end - connect_timing_.ssl_start; 348 connect_timing_.ssl_end - connect_timing_.ssl_start;
349 if (params_->expect_spdy()) { 349 if (params_->expect_spdy()) {
350 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2", 350 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2",
351 connect_duration, 351 connect_duration,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 if (base_.CloseOneIdleSocket()) 693 if (base_.CloseOneIdleSocket())
694 return true; 694 return true;
695 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 695 return base_.CloseOneIdleConnectionInHigherLayeredPool();
696 } 696 }
697 697
698 void SSLClientSocketPool::OnSSLConfigChanged() { 698 void SSLClientSocketPool::OnSSLConfigChanged() {
699 FlushWithError(ERR_NETWORK_CHANGED); 699 FlushWithError(ERR_NETWORK_CHANGED);
700 } 700 }
701 701
702 } // namespace net 702 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_network_transaction_unittest.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698