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. |