diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 17:18:53 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 17:18:53 +0000 |
commit | edafd4c1a5c906e808e2448810e2099d8dc704b9 (patch) | |
tree | 4ccc930c0b9ff8663183ebb6333e9ac990f0e491 /net/base | |
parent | 063bb25a11a9258c44d61210dfd98f41e7b4f24a (diff) | |
download | chromium_src-edafd4c1a5c906e808e2448810e2099d8dc704b9.zip chromium_src-edafd4c1a5c906e808e2448810e2099d8dc704b9.tar.gz chromium_src-edafd4c1a5c906e808e2448810e2099d8dc704b9.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.
Update some documentation about empty trial names, add TrialExists() method and update many call-sites to use this (it simplifies the previous logic which checked for existence and then for non-empty name, which can no longer happen).
Refactor a bit in browser_main.
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.
Initially committed as r84197.
Rolled back due to DCHECK in official builds, r84373.
Will re-submit with fix.
BUG=81750
TEST=base_unittests
Review URL: http://codereview.chromium.org/6883102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/host_resolver_impl.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 8b33229..8c9d17f 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -554,9 +554,8 @@ class HostResolverImpl::Job UMA_HISTOGRAM_ENUMERATION("DNS.ResolveCategory", category, RESOLVE_MAX); - static bool show_speculative_experiment_histograms = - base::FieldTrialList::Find("DnsImpact") && - !base::FieldTrialList::Find("DnsImpact")->group_name().empty(); + static const bool show_speculative_experiment_histograms = + base::FieldTrialList::TrialExists("DnsImpact"); if (show_speculative_experiment_histograms) { UMA_HISTOGRAM_ENUMERATION( base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsImpact"), @@ -566,9 +565,8 @@ class HostResolverImpl::Job "DnsImpact"), duration); } } - static bool show_parallelism_experiment_histograms = - base::FieldTrialList::Find("DnsParallelism") && - !base::FieldTrialList::Find("DnsParallelism")->group_name().empty(); + static const bool show_parallelism_experiment_histograms = + base::FieldTrialList::TrialExists("DnsParallelism"); if (show_parallelism_experiment_histograms) { UMA_HISTOGRAM_ENUMERATION( base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsParallelism"), |