| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 total_duration, | 1592 total_duration, |
| 1593 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1593 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1594 100); | 1594 100); |
| 1595 | 1595 |
| 1596 if (!reused_socket_) { | 1596 if (!reused_socket_) { |
| 1597 UMA_HISTOGRAM_CLIPPED_TIMES( | 1597 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1598 "Net.Transaction_Connected_New", | 1598 "Net.Transaction_Connected_New", |
| 1599 total_duration, | 1599 total_duration, |
| 1600 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1600 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1601 100); | 1601 100); |
| 1602 |
| 1603 static bool use_conn_count_impact = |
| 1604 FieldTrialList::Find("ConnCountImpact") && |
| 1605 !FieldTrialList::Find("ConnCountImpact")->group_name().empty(); |
| 1606 if (use_conn_count_impact) { |
| 1607 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1608 FieldTrial::MakeName("Net.Transaction_Connected_New", |
| 1609 "ConnCountImpact"), |
| 1610 total_duration, |
| 1611 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| 1612 100); |
| 1613 } |
| 1602 } | 1614 } |
| 1603 | 1615 |
| 1604 // Currently, non-zero priority requests are frame or sub-frame resource | 1616 // Currently, non-zero priority requests are frame or sub-frame resource |
| 1605 // types. This will change when we also prioritize certain subresources like | 1617 // types. This will change when we also prioritize certain subresources like |
| 1606 // css, js, etc. | 1618 // css, js, etc. |
| 1607 if (request_->priority) { | 1619 if (request_->priority) { |
| 1608 UMA_HISTOGRAM_CLIPPED_TIMES( | 1620 UMA_HISTOGRAM_CLIPPED_TIMES( |
| 1609 "Net.Priority_High_Latency", | 1621 "Net.Priority_High_Latency", |
| 1610 total_duration, | 1622 total_duration, |
| 1611 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1623 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2206 endpoint_); | 2218 endpoint_); |
| 2207 | 2219 |
| 2208 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; | 2220 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; |
| 2209 if (connection_->socket()) | 2221 if (connection_->socket()) |
| 2210 connection_->socket()->Disconnect(); | 2222 connection_->socket()->Disconnect(); |
| 2211 connection_->Reset(); | 2223 connection_->Reset(); |
| 2212 next_state_ = STATE_INIT_CONNECTION; | 2224 next_state_ = STATE_INIT_CONNECTION; |
| 2213 } | 2225 } |
| 2214 | 2226 |
| 2215 } // namespace net | 2227 } // namespace net |
| OLD | NEW |