| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ |
| 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| 11 #include "net/base/cache_type.h" | 11 #include "net/base/cache_type.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 | 13 |
| 14 namespace disk_cache { | 14 namespace disk_cache { |
| 15 | 15 |
| 16 NET_EXPORT_PRIVATE extern const base::Feature kSimpleSizeExperiment; | 16 NET_EXPORT_PRIVATE extern const base::Feature kSimpleSizeExperiment; |
| 17 NET_EXPORT_PRIVATE extern const base::Feature |
| 18 kSimpleCacheEvictionWithSizeExperiment; |
| 17 NET_EXPORT_PRIVATE extern const char kSizeMultiplierParam[]; | 19 NET_EXPORT_PRIVATE extern const char kSizeMultiplierParam[]; |
| 20 NET_EXPORT_PRIVATE extern const char kSizeEvictionParam[]; |
| 18 | 21 |
| 19 // This lists the experiment groups for SimpleCache. Only add new groups at | 22 // This lists the experiment groups for SimpleCache. Only add new groups at |
| 20 // the end of the list, and always increase the number. | 23 // the end of the list, and always increase the number. |
| 21 enum class SimpleExperimentType : uint32_t { | 24 enum class SimpleExperimentType : uint32_t { |
| 22 NONE = 0, | 25 NONE = 0, |
| 23 SIZE = 1, | 26 SIZE = 1, |
| 27 |
| 28 // param = 0 -> control group |
| 29 // param = 1 -> experiment group |
| 30 EVICT_WITH_SIZE = 2, |
| 24 }; | 31 }; |
| 25 | 32 |
| 26 struct NET_EXPORT_PRIVATE SimpleExperiment { | 33 struct NET_EXPORT_PRIVATE SimpleExperiment { |
| 27 SimpleExperimentType type = SimpleExperimentType::NONE; | 34 SimpleExperimentType type = SimpleExperimentType::NONE; |
| 28 uint32_t param = 0; | 35 uint32_t param = 0; |
| 29 }; | 36 }; |
| 30 | 37 |
| 31 NET_EXPORT_PRIVATE SimpleExperiment | 38 NET_EXPORT_PRIVATE SimpleExperiment |
| 32 GetSimpleExperiment(net::CacheType cache_type); | 39 GetSimpleExperiment(net::CacheType cache_type); |
| 33 | 40 |
| 34 } // namespace disk_cache | 41 } // namespace disk_cache |
| 35 | 42 |
| 36 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ | 43 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ |
| OLD | NEW |