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

Unified Diff: chrome/browser/net/async_dns_field_trial.cc

Issue 11262018: Move AsyncDns field trial to server-side control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 2 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
« no previous file with comments | « chrome/browser/net/async_dns_field_trial.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/async_dns_field_trial.cc
diff --git a/chrome/browser/net/async_dns_field_trial.cc b/chrome/browser/net/async_dns_field_trial.cc
index 95ce472b48897f292f4db492b635c02d788dc9b0..8a5725a4b990abf9ac1ae5fa9d25663f002467fa 100644
--- a/chrome/browser/net/async_dns_field_trial.cc
+++ b/chrome/browser/net/async_dns_field_trial.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/net/async_dns_field_trial.h"
#include "base/metrics/field_trial.h"
+#include "base/string_util.h"
#include "build/build_config.h"
-#include "chrome/common/chrome_version_info.h"
namespace chrome_browser_net {
@@ -15,18 +15,12 @@ bool ConfigureAsyncDnsFieldTrial() {
// There is no DnsConfigService on those platforms so disable the field trial.
return false;
#endif
- const base::FieldTrial::Probability kAsyncDnsDivisor = 100;
- base::FieldTrial::Probability enabled_probability = 0;
-
- if (chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV)
- enabled_probability = 50;
-
- scoped_refptr<base::FieldTrial> trial(
- base::FieldTrialList::FactoryGetFieldTrial(
- "AsyncDns", kAsyncDnsDivisor, "disabled", 2012, 10, 30, NULL));
-
- int enabled_group = trial->AppendGroup("enabled", enabled_probability);
- return trial->group() == enabled_group;
+ // Configure the AsyncDns field trial as follows:
+ // groups AsyncDnsA and AsyncDnsB: return true,
+ // groups SystemDnsA and SystemDnsB: return false,
+ // otherwise (trial absent): return false.
+ return StartsWithASCII(base::FieldTrialList::FindFullName("AsyncDns"),
+ "AsyncDns", false /* case_sensitive */);
}
} // namespace chrome_browser_net
« no previous file with comments | « chrome/browser/net/async_dns_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698