diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 18:52:32 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 18:52:32 +0000 |
commit | 933729bcb0e1bba8dbe99059de9a97beff308efe (patch) | |
tree | 196a39b4c67997df4f27e0b216a5a3318cad3620 /net/disk_cache | |
parent | 22c981da75b0251c726f1f3520da8605fa78002a (diff) | |
download | chromium_src-933729bcb0e1bba8dbe99059de9a97beff308efe.zip chromium_src-933729bcb0e1bba8dbe99059de9a97beff308efe.tar.gz chromium_src-933729bcb0e1bba8dbe99059de9a97beff308efe.tar.bz2 |
.c Feature to disable field trials in old versions of Chromium. Field trials
tests are (usually) monitored for a fixed length of time. With this change
field trial tests turn them selves off (will use the default group) after
the expiration time (specified in the Field Trial constructor).
BUG=13463
TEST=field_trial_unittests tests this code thorougly. spdy session and testing
field_trials in renderer process would be very helpful. thanks much.
Review URL: http://codereview.chromium.org/6317004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index b406601..3d0e403 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -174,13 +174,16 @@ bool SetFieldTrialInfo(int size_group) { // Field trials involve static objects so we have to do this only once. first = false; - scoped_refptr<base::FieldTrial> trial1( - new base::FieldTrial("CacheSize", 10)); std::string group1 = base::StringPrintf("CacheSizeGroup_%d", size_group); - trial1->AppendGroup(group1, base::FieldTrial::kAllRemainingProbability); + int totalProbability = 10; + scoped_refptr<base::FieldTrial> trial1( + new base::FieldTrial("CacheSize", totalProbability, group1, 2011, 6, 30)); + trial1->AppendGroup(group1, totalProbability); + // After June 30, 2011 builds, it will always be in default group. scoped_refptr<base::FieldTrial> trial2( - new base::FieldTrial("CacheThrottle", 100)); + new base::FieldTrial( + "CacheThrottle", 100, "CacheThrottle_Default", 2011, 6, 30)); int group2a = trial2->AppendGroup("CacheThrottle_On", 10); // 10 % in. trial2->AppendGroup("CacheThrottle_Off", 10); // 10 % control. |