summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_transaction.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 02:22:11 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 02:22:11 +0000
commit780702c2aac603a5ca09c22e34d3f913a375627d (patch)
tree9eec20da47f64859a072a8ca2ca03823953e5d52 /net/http/http_network_transaction.cc
parent8dc0234a8d2cec8bb1979ec8dec05bf23a79a42a (diff)
downloadchromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.zip
chromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.tar.gz
chromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.tar.bz2
Add one-time randomization support for FieldTrial, and the ability to
disable field trials. I am going to have a need for both soon. Cleaning up some comments about empty trial names, adding static method TrialExists() and simplifying many call sites by using this method. While I'm in there and needing base/OWNERS approval, add an OWNERS file for base/metrics that adds jar@chromium.org as an owner for that directory. BUG=none TEST=base_unittests TBR=jam@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.cc')
-rw-r--r--net/http/http_network_transaction.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 46858e6..604d793 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1007,9 +1007,8 @@ void HttpNetworkTransaction::LogTransactionConnectedMetrics() {
base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
100);
- static bool use_conn_impact_histogram(
- base::FieldTrialList::Find("ConnCountImpact") &&
- !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty());
+ static const bool use_conn_impact_histogram =
+ base::FieldTrialList::TrialExists("ConnCountImpact");
if (use_conn_impact_histogram) {
UMA_HISTOGRAM_CLIPPED_TIMES(
base::FieldTrial::MakeName("Net.Transaction_Connected_New",
@@ -1020,8 +1019,8 @@ void HttpNetworkTransaction::LogTransactionConnectedMetrics() {
}
}
- static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") &&
- !base::FieldTrialList::Find("SpdyImpact")->group_name().empty());
+ static const bool use_spdy_histogram =
+ base::FieldTrialList::TrialExists("SpdyImpact");
if (use_spdy_histogram && response_.was_npn_negotiated) {
UMA_HISTOGRAM_CLIPPED_TIMES(
base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10",