diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 00:36:31 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 00:36:31 +0000 |
commit | 28da5d89c77bd784454dc9a59b4ecce67346b6cc (patch) | |
tree | ffdf5fec9a8c3da61f52cc0d619bba2a5baa67c3 /net/disk_cache | |
parent | ea0785cb9bd36e997d8052c74d646410879ed3fc (diff) | |
download | chromium_src-28da5d89c77bd784454dc9a59b4ecce67346b6cc.zip chromium_src-28da5d89c77bd784454dc9a59b4ecce67346b6cc.tar.gz chromium_src-28da5d89c77bd784454dc9a59b4ecce67346b6cc.tar.bz2 |
Disk Cache: Close the deleted list experiment for new users.
This is intended for the 15.0.874 branch.
BUG=97296
TEST=none
TBR=gavinp@chromium.org
Review URL: http://codereview.chromium.org/8233019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 3903a58..081ef18 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -175,35 +175,13 @@ bool InitExperiment(disk_cache::IndexHeader* header, uint32 mask) { return false; } - // See if we already defined the group for this profile. - if (header->experiment > disk_cache::EXPERIMENT_DELETED_LIST_OUT) { - SetFieldTrialInfo(header->experiment); - return true; - } - - if (!header->create_time || !header->lru.filled) - return true; // Wait untill we fill up the cache. - - int index_load = header->num_entries * 100 / (mask + 1); - if (index_load > 25) { - // Out of the experiment (~18% users). - header->experiment = disk_cache::EXPERIMENT_DELETED_LIST_OUT2; - return true; - } + // The current experiment is closed for new profiles. + if (header->experiment < disk_cache::EXPERIMENT_DELETED_LIST_OUT) + header->experiment = disk_cache::EXPERIMENT_DELETED_LIST_OUT; - int option = base::RandInt(0, 4); - if (option > 1) { - // 60% out (49% of the total). - header->experiment = disk_cache::EXPERIMENT_DELETED_LIST_OUT2; - } else if (!option) { - // About 16% of the total. - header->experiment = disk_cache::EXPERIMENT_DELETED_LIST_CONTROL; - } else { - // About 16% of the total. - header->experiment = disk_cache::EXPERIMENT_DELETED_LIST_IN; - } - - SetFieldTrialInfo(header->experiment); + // If we are part of the experiment, set up the field trial. + if (header->experiment > disk_cache::EXPERIMENT_DELETED_LIST_OUT) + SetFieldTrialInfo(header->experiment); return true; } |