summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/host_resolver_impl.cc10
-rw-r--r--net/http/http_cache_transaction.cc3
-rw-r--r--net/http/http_network_transaction.cc9
-rw-r--r--net/socket/client_socket_pool_histograms.cc8
-rw-r--r--net/socket/ssl_client_socket_pool.cc5
-rw-r--r--net/socket/stream_socket.cc5
-rw-r--r--net/url_request/url_request_http_job.cc3
7 files changed, 26 insertions, 17 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 8c9d17f..8b33229 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -554,8 +554,9 @@ class HostResolverImpl::Job
UMA_HISTOGRAM_ENUMERATION("DNS.ResolveCategory", category, RESOLVE_MAX);
- static const bool show_speculative_experiment_histograms =
- base::FieldTrialList::TrialExists("DnsImpact");
+ static bool show_speculative_experiment_histograms =
+ base::FieldTrialList::Find("DnsImpact") &&
+ !base::FieldTrialList::Find("DnsImpact")->group_name().empty();
if (show_speculative_experiment_histograms) {
UMA_HISTOGRAM_ENUMERATION(
base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsImpact"),
@@ -565,8 +566,9 @@ class HostResolverImpl::Job
"DnsImpact"), duration);
}
}
- static const bool show_parallelism_experiment_histograms =
- base::FieldTrialList::TrialExists("DnsParallelism");
+ static bool show_parallelism_experiment_histograms =
+ base::FieldTrialList::Find("DnsParallelism") &&
+ !base::FieldTrialList::Find("DnsParallelism")->group_name().empty();
if (show_parallelism_experiment_histograms) {
UMA_HISTOGRAM_ENUMERATION(
base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsParallelism"),
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index c8b2b33..ec7561b 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -870,7 +870,8 @@ int HttpCache::Transaction::DoAddToEntryComplete(int result) {
base::TimeTicks::Now() - entry_lock_waiting_since_;
UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait);
static const bool prefetching_fieldtrial =
- base::FieldTrialList::TrialExists("Prefetch");
+ base::FieldTrialList::Find("Prefetch") &&
+ !base::FieldTrialList::Find("Prefetch")->group_name().empty();
if (prefetching_fieldtrial) {
UMA_HISTOGRAM_TIMES(
base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"),
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index f298679..5cd2f92 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1010,8 +1010,9 @@ void HttpNetworkTransaction::LogTransactionConnectedMetrics() {
base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
100);
- static const bool use_conn_impact_histogram =
- base::FieldTrialList::TrialExists("ConnCountImpact");
+ static bool use_conn_impact_histogram(
+ base::FieldTrialList::Find("ConnCountImpact") &&
+ !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty());
if (use_conn_impact_histogram) {
UMA_HISTOGRAM_CLIPPED_TIMES(
base::FieldTrial::MakeName("Net.Transaction_Connected_New",
@@ -1022,8 +1023,8 @@ void HttpNetworkTransaction::LogTransactionConnectedMetrics() {
}
}
- static const bool use_spdy_histogram =
- base::FieldTrialList::TrialExists("SpdyImpact");
+ static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") &&
+ !base::FieldTrialList::Find("SpdyImpact")->group_name().empty());
if (use_spdy_histogram && response_.was_npn_negotiated) {
UMA_HISTOGRAM_CLIPPED_TIMES(
base::FieldTrial::MakeName("Net.Transaction_Connected_Under_10",
diff --git a/net/socket/client_socket_pool_histograms.cc b/net/socket/client_socket_pool_histograms.cc
index 5c3bddb..202112b 100644
--- a/net/socket/client_socket_pool_histograms.cc
+++ b/net/socket/client_socket_pool_histograms.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -58,8 +58,10 @@ void ClientSocketPoolHistograms::AddSocketType(int type) const {
void ClientSocketPoolHistograms::AddRequestTime(base::TimeDelta time) const {
request_time_->AddTime(time);
- static const bool proxy_connection_impact_trial_exists =
- base::FieldTrialList::TrialExists("ProxyConnectionImpact");
+ static bool proxy_connection_impact_trial_exists(
+ base::FieldTrialList::Find("ProxyConnectionImpact") &&
+ !base::FieldTrialList::Find("ProxyConnectionImpact")->
+ group_name().empty());
if (proxy_connection_impact_trial_exists && is_http_proxy_connection_) {
UMA_HISTOGRAM_CUSTOM_TIMES(
base::FieldTrial::MakeName("Net.HttpProxySocketRequestTime",
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 7bde6d0..5f8daa7 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -347,8 +347,9 @@ int SSLConnectJob::DoSSLConnectComplete(int result) {
100);
}
- static const bool false_start_trial =
- base::FieldTrialList::TrialExists("SSLFalseStart");
+ static bool false_start_trial(
+ base::FieldTrialList::Find("SSLFalseStart") &&
+ !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty());
if (false_start_trial) {
UMA_HISTOGRAM_CUSTOM_TIMES(base::FieldTrial::MakeName(
"Net.SSL_Connection_Latency",
diff --git a/net/socket/stream_socket.cc b/net/socket/stream_socket.cc
index 3ef24c0..37482b4 100644
--- a/net/socket/stream_socket.cc
+++ b/net/socket/stream_socket.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -134,7 +134,8 @@ void StreamSocket::UseHistory::EmitPreconnectionHistograms() const {
UMA_HISTOGRAM_ENUMERATION("Net.PreconnectUtilization2", result, 9);
static const bool connect_backup_jobs_fieldtrial =
- base::FieldTrialList::TrialExists("ConnnectBackupJobs");
+ base::FieldTrialList::Find("ConnnectBackupJobs") &&
+ !base::FieldTrialList::Find("ConnnectBackupJobs")->group_name().empty();
if (connect_backup_jobs_fieldtrial) {
UMA_HISTOGRAM_ENUMERATION(
base::FieldTrial::MakeName("Net.PreconnectUtilization2",
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 8504260..95ea53c 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -1127,7 +1127,8 @@ void URLRequestHttpJob::RecordTimer() {
request_creation_time_ = base::Time();
static const bool use_prefetch_histogram =
- base::FieldTrialList::TrialExists("Prefetch");
+ base::FieldTrialList::Find("Prefetch") &&
+ !base::FieldTrialList::Find("Prefetch")->group_name().empty();
UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start);
if (use_prefetch_histogram) {