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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 "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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 DCHECK(!connect_timing_.ssl_start.is_null()); 363 DCHECK(!connect_timing_.ssl_start.is_null());
364 base::TimeDelta connect_duration = 364 base::TimeDelta connect_duration =
365 connect_timing_.ssl_end - connect_timing_.ssl_start; 365 connect_timing_.ssl_end - connect_timing_.ssl_start;
366 if (using_spdy) { 366 if (using_spdy) {
367 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2", 367 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2",
368 connect_duration, 368 connect_duration,
369 base::TimeDelta::FromMilliseconds(1), 369 base::TimeDelta::FromMilliseconds(1),
370 base::TimeDelta::FromMinutes(1), 370 base::TimeDelta::FromMinutes(1),
371 100); 371 100);
372 } 372 }
373 #if defined(SPDY_PROXY_AUTH_ORIGIN)
374 bool using_data_reduction_proxy = params_->host_and_port().Equals( 373 bool using_data_reduction_proxy = params_->host_and_port().Equals(
375 HostPortPair::FromURL(GURL(SPDY_PROXY_AUTH_ORIGIN))); 374 HostPortPair::FromURL(GURL(SPDY_PROXY_AUTH_ORIGIN)));
376 if (using_data_reduction_proxy) { 375 if (using_data_reduction_proxy) {
377 UMA_HISTOGRAM_CUSTOM_TIMES( 376 UMA_HISTOGRAM_CUSTOM_TIMES(
bengr 2014/07/11 20:42:54 I don't think we need this UMA anymore. Ask around
378 "Net.SSL_Connection_Latency_DataReductionProxy", 377 "Net.SSL_Connection_Latency_DataReductionProxy",
379 connect_duration, 378 connect_duration,
380 base::TimeDelta::FromMilliseconds(1), 379 base::TimeDelta::FromMilliseconds(1),
381 base::TimeDelta::FromMinutes(1), 380 base::TimeDelta::FromMinutes(1),
382 100); 381 100);
383 } 382 }
384 #endif
385 383
386 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_2", 384 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_2",
387 connect_duration, 385 connect_duration,
388 base::TimeDelta::FromMilliseconds(1), 386 base::TimeDelta::FromMilliseconds(1),
389 base::TimeDelta::FromMinutes(1), 387 base::TimeDelta::FromMinutes(1),
390 100); 388 100);
391 389
392 SSLInfo ssl_info; 390 SSLInfo ssl_info;
393 ssl_socket_->GetSSLInfo(&ssl_info); 391 ssl_socket_->GetSSLInfo(&ssl_info);
394 392
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 if (base_.CloseOneIdleSocket()) 675 if (base_.CloseOneIdleSocket())
678 return true; 676 return true;
679 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 677 return base_.CloseOneIdleConnectionInHigherLayeredPool();
680 } 678 }
681 679
682 void SSLClientSocketPool::OnSSLConfigChanged() { 680 void SSLClientSocketPool::OnSSLConfigChanged() {
683 FlushWithError(ERR_NETWORK_CHANGED); 681 FlushWithError(ERR_NETWORK_CHANGED);
684 } 682 }
685 683
686 } // namespace net 684 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698