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

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

Issue 2195273003: Deprecate SPDY/3.1 and draft HTTP/2 enum values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « net/socket/ssl_client_socket.cc ('k') | no next file » | 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 <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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 329
330 connect_timing_.ssl_end = base::TimeTicks::Now(); 330 connect_timing_.ssl_end = base::TimeTicks::Now();
331 331
332 if (result != OK && !server_address_.address().empty()) { 332 if (result != OK && !server_address_.address().empty()) {
333 connection_attempts_.push_back(ConnectionAttempt(server_address_, result)); 333 connection_attempts_.push_back(ConnectionAttempt(server_address_, result));
334 server_address_ = IPEndPoint(); 334 server_address_ = IPEndPoint();
335 } 335 }
336 336
337 // If we want SPDY over ALPN/NPN, make sure it succeeded. 337 // If we want SPDY over ALPN/NPN, make sure it succeeded.
338 if (params_->expect_spdy() && 338 if (params_->expect_spdy() &&
339 !NextProtoIsSPDY(ssl_socket_->GetNegotiatedProtocol())) { 339 ssl_socket_->GetNegotiatedProtocol() != kProtoHTTP2) {
340 return ERR_NPN_NEGOTIATION_FAILED; 340 return ERR_NPN_NEGOTIATION_FAILED;
341 } 341 }
342 342
343 if (result == OK || 343 if (result == OK ||
344 ssl_socket_->IgnoreCertError(result, params_->load_flags())) { 344 ssl_socket_->IgnoreCertError(result, params_->load_flags())) {
345 DCHECK(!connect_timing_.ssl_start.is_null()); 345 DCHECK(!connect_timing_.ssl_start.is_null());
346 base::TimeDelta connect_duration = 346 base::TimeDelta connect_duration =
347 connect_timing_.ssl_end - connect_timing_.ssl_start; 347 connect_timing_.ssl_end - connect_timing_.ssl_start;
348 if (params_->expect_spdy()) { 348 if (params_->expect_spdy()) {
349 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2", 349 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2",
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 if (base_.CloseOneIdleSocket()) 670 if (base_.CloseOneIdleSocket())
671 return true; 671 return true;
672 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 672 return base_.CloseOneIdleConnectionInHigherLayeredPool();
673 } 673 }
674 674
675 void SSLClientSocketPool::OnSSLConfigChanged() { 675 void SSLClientSocketPool::OnSSLConfigChanged() {
676 FlushWithError(ERR_NETWORK_CHANGED); 676 FlushWithError(ERR_NETWORK_CHANGED);
677 } 677 }
678 678
679 } // namespace net 679 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698