| 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 100); | 1004 100); |
| 1005 | 1005 |
| 1006 bool reused_socket = stream_->IsConnectionReused(); | 1006 bool reused_socket = stream_->IsConnectionReused(); |
| 1007 if (!reused_socket) { | 1007 if (!reused_socket) { |
| 1008 UMA_HISTOGRAM_CLIPPED_TIMES( | 1008 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1009 "Net.Transaction_Connected_New", | 1009 "Net.Transaction_Connected_New", |
| 1010 total_duration, | 1010 total_duration, |
| 1011 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1011 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1012 100); | 1012 100); |
| 1013 | 1013 |
| 1014 static bool use_conn_impact_histogram( | 1014 static const bool use_conn_impact_histogram = |
| 1015 base::FieldTrialList::Find("ConnCountImpact") && | 1015 base::FieldTrialList::TrialExists("ConnCountImpact"); |
| 1016 !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty()); | |
| 1017 if (use_conn_impact_histogram) { | 1016 if (use_conn_impact_histogram) { |
| 1018 UMA_HISTOGRAM_CLIPPED_TIMES( | 1017 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1019 base::FieldTrial::MakeName("Net.Transaction_Connected_New", | 1018 base::FieldTrial::MakeName("Net.Transaction_Connected_New", |
| 1020 "ConnCountImpact"), | 1019 "ConnCountImpact"), |
| 1021 total_duration, | 1020 total_duration, |
| 1022 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1021 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1023 100); | 1022 100); |
| 1024 } | 1023 } |
| 1025 } | 1024 } |
| 1026 | 1025 |
| 1027 static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") && | 1026 static const bool use_spdy_histogram = |
| 1028 !base::FieldTrialList::Find("SpdyImpact")->group_name().empty()); | 1027 base::FieldTrialList::TrialExists("SpdyImpact"); |
| 1029 if (use_spdy_histogram && response_.was_npn_negotiated) { | 1028 if (use_spdy_histogram && response_.was_npn_negotiated) { |
| 1030 UMA_HISTOGRAM_CLIPPED_TIMES( | 1029 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1031 base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10", | 1030 base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10", |
| 1032 "SpdyImpact"), | 1031 "SpdyImpact"), |
| 1033 total_duration, base::TimeDelta::FromMilliseconds(1), | 1032 total_duration, base::TimeDelta::FromMilliseconds(1), |
| 1034 base::TimeDelta::FromMinutes(10), 100); | 1033 base::TimeDelta::FromMinutes(10), 100); |
| 1035 | 1034 |
| 1036 if (!reused_socket) { | 1035 if (!reused_socket) { |
| 1037 UMA_HISTOGRAM_CLIPPED_TIMES( | 1036 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1038 base::FieldTrial::MakeName("Net.Transaction_Connected_New", | 1037 base::FieldTrial::MakeName("Net.Transaction_Connected_New", |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1342 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1344 state); | 1343 state); |
| 1345 break; | 1344 break; |
| 1346 } | 1345 } |
| 1347 return description; | 1346 return description; |
| 1348 } | 1347 } |
| 1349 | 1348 |
| 1350 #undef STATE_CASE | 1349 #undef STATE_CASE |
| 1351 | 1350 |
| 1352 } // namespace net | 1351 } // namespace net |
| OLD | NEW |