Chromium Code Reviews| 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 EVICT_WITH_SIZE = 2, | |
|
pasko
2017/07/18 15:30:01
Please note in the comment how the param is used (
hubbe
2017/07/18 18:27:39
Done.
| |
| 24 }; | 28 }; |
| 25 | 29 |
| 26 struct NET_EXPORT_PRIVATE SimpleExperiment { | 30 struct NET_EXPORT_PRIVATE SimpleExperiment { |
| 27 SimpleExperimentType type = SimpleExperimentType::NONE; | 31 SimpleExperimentType type = SimpleExperimentType::NONE; |
| 28 uint32_t param = 0; | 32 uint32_t param = 0; |
| 29 }; | 33 }; |
| 30 | 34 |
| 31 NET_EXPORT_PRIVATE SimpleExperiment | 35 NET_EXPORT_PRIVATE SimpleExperiment |
| 32 GetSimpleExperiment(net::CacheType cache_type); | 36 GetSimpleExperiment(net::CacheType cache_type); |
| 33 | 37 |
| 34 } // namespace disk_cache | 38 } // namespace disk_cache |
| 35 | 39 |
| 36 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ | 40 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_EXPERIMENT_H_ |
| OLD | NEW |