Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: net/base/host_resolver_impl.cc

Issue 6883102: Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review comments. Fix initialization in browser_main. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 894443cf76345989c7d895ba6e0a9a08fedbeefc..8b8984eea541f3ec4d0c4634ef4e3932f41a6dc4 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -566,9 +566,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"),
@@ -578,9 +577,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"),

Powered by Google App Engine
This is Rietveld 408576698