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