| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 100); | 1000 100); |
| 1001 | 1001 |
| 1002 bool reused_socket = stream_->IsConnectionReused(); | 1002 bool reused_socket = stream_->IsConnectionReused(); |
| 1003 if (!reused_socket) { | 1003 if (!reused_socket) { |
| 1004 UMA_HISTOGRAM_CLIPPED_TIMES( | 1004 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1005 "Net.Transaction_Connected_New", | 1005 "Net.Transaction_Connected_New", |
| 1006 total_duration, | 1006 total_duration, |
| 1007 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1007 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1008 100); | 1008 100); |
| 1009 | 1009 |
| 1010 static bool use_conn_impact_histogram( | 1010 static const bool use_conn_impact_histogram = |
| 1011 base::FieldTrialList::Find("ConnCountImpact") && | 1011 base::FieldTrialList::TrialExists("ConnCountImpact"); |
| 1012 !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty()); | |
| 1013 if (use_conn_impact_histogram) { | 1012 if (use_conn_impact_histogram) { |
| 1014 UMA_HISTOGRAM_CLIPPED_TIMES( | 1013 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1015 base::FieldTrial::MakeName("Net.Transaction_Connected_New", | 1014 base::FieldTrial::MakeName("Net.Transaction_Connected_New", |
| 1016 "ConnCountImpact"), | 1015 "ConnCountImpact"), |
| 1017 total_duration, | 1016 total_duration, |
| 1018 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1017 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1019 100); | 1018 100); |
| 1020 } | 1019 } |
| 1021 } | 1020 } |
| 1022 | 1021 |
| 1023 static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") && | 1022 static const bool use_spdy_histogram = |
| 1024 !base::FieldTrialList::Find("SpdyImpact")->group_name().empty()); | 1023 base::FieldTrialList::TrialExists("SpdyImpact"); |
| 1025 if (use_spdy_histogram && response_.was_npn_negotiated) { | 1024 if (use_spdy_histogram && response_.was_npn_negotiated) { |
| 1026 UMA_HISTOGRAM_CLIPPED_TIMES( | 1025 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1027 base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10", | 1026 base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10", |
| 1028 "SpdyImpact"), | 1027 "SpdyImpact"), |
| 1029 total_duration, base::TimeDelta::FromMilliseconds(1), | 1028 total_duration, base::TimeDelta::FromMilliseconds(1), |
| 1030 base::TimeDelta::FromMinutes(10), 100); | 1029 base::TimeDelta::FromMinutes(10), 100); |
| 1031 | 1030 |
| 1032 if (!reused_socket) { | 1031 if (!reused_socket) { |
| 1033 UMA_HISTOGRAM_CLIPPED_TIMES( | 1032 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1034 base::FieldTrial::MakeName("Net.Transaction_Connected_New", | 1033 base::FieldTrial::MakeName("Net.Transaction_Connected_New", |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1338 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1340 state); | 1339 state); |
| 1341 break; | 1340 break; |
| 1342 } | 1341 } |
| 1343 return description; | 1342 return description; |
| 1344 } | 1343 } |
| 1345 | 1344 |
| 1346 #undef STATE_CASE | 1345 #undef STATE_CASE |
| 1347 | 1346 |
| 1348 } // namespace net | 1347 } // namespace net |
| OLD | NEW |