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

Unified Diff: net/base/host_resolver_impl.cc

Issue 10828373: [net] Add AsyncDns field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better var names Created 8 years, 4 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
« chrome/browser/io_thread.cc ('K') | « net/base/host_resolver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index ce6f1264f40da6914f6ecbc9a48d997d665ffe2a..2803a3cfb88a29e0df361daa93e71cf54c0b6c0a 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -467,6 +467,18 @@ HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves,
net_log);
}
+bool ConfigureAsyncDnsFieldTrial() {
+ const base::FieldTrial::Probability kAsyncDnsDivisor = 100;
cbentzel 2012/08/20 11:45:56 Perhaps restrict enabled_probability to non-0 valu
szym 2012/08/20 17:54:21 Good idea although net cannot depend on chrome/ an
cbentzel 2012/08/21 10:50:53 Yes. I personally think it makes sense there - you
+ base::FieldTrial::Probability enabled_probability = 50;
+
+ scoped_refptr<base::FieldTrial> trial(
+ base::FieldTrialList::FactoryGetFieldTrial(
+ "AsyncDns", kAsyncDnsDivisor, "disabled", 2012, 9, 30, NULL));
+
+ int enabled_group = trial->AppendGroup("enabled", enabled_probability);
cbentzel 2012/08/21 10:50:53 Should this be restricted to supported platforms o
+ return trial->group() == enabled_group;
+}
+
//-----------------------------------------------------------------------------
// Holds the data for a request that could not be completed synchronously.
« chrome/browser/io_thread.cc ('K') | « net/base/host_resolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698