Lines Matching defs:experiment
62 Experiment::SINGLE_VALUE, \
68 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
73 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
81 // whether the experiment is available on that platform.
132 const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
142 const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
150 const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
158 const Experiment::Choice kTouchEventsChoices[] = {
168 const Experiment::Choice kTouchOptimizedUIChoices[] = {
178 const Experiment::Choice kNaClDebugMaskChoices[] = {
189 const Experiment::Choice kImplSidePaintingChoices[] = {
197 const Experiment::Choice kDeadlineSchedulingChoices[] = {
205 const Experiment::Choice kUIDeadlineSchedulingChoices[] = {
213 const Experiment::Choice kLCDTextChoices[] = {
219 const Experiment::Choice kDelegatedRendererChoices[] = {
227 const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
239 const Experiment::Choice kDefaultTileWidthChoices[] = {
252 const Experiment::Choice kAshOverviewDelayChoices[] = {
265 const Experiment::Choice kDefaultTileHeightChoices[] = {
277 const Experiment::Choice kSimpleCacheBackendChoices[] = {
286 const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
296 const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
307 const Experiment::Choice kMapImageChoices[] = {
316 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
329 const Experiment::Choice kNumRasterThreadsChoices[] = {
342 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
356 // The first line of the experiment is the internal name. If you'd like to
377 // To add a new experiment add to the end of kExperiments. There are two
379 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
383 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
385 // See the documentation of Experiment for details on the fields.
388 const Experiment kExperiments[] = {
1888 "enable-zero-suggest-experiment",
1926 const Experiment* experiments = kExperiments;
1958 // Adds the internal names for the specified experiment to |names|.
1959 void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1960 if (e.type == Experiment::SINGLE_VALUE) {
1963 DCHECK(e.type == Experiment::MULTI_VALUE ||
1964 e.type == Experiment::ENABLE_DISABLE_VALUE);
1970 // Confirms that an experiment is valid, used in a DCHECK in
1972 bool ValidateExperiment(const Experiment& e) {
1974 case Experiment::SINGLE_VALUE:
1978 case Experiment::MULTI_VALUE:
1984 case Experiment::ENABLE_DISABLE_VALUE:
2026 bool SkipConditionalExperiment(const Experiment& experiment) {
2027 if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
2063 // Returns the Value representing the choice data in the specified experiment.
2064 Value* CreateChoiceData(const Experiment& experiment,
2066 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2067 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
2069 for (int i = 0; i < experiment.num_choices; ++i) {
2071 const std::string name = experiment.NameForChoice(i);
2073 value->SetString("description", experiment.DescriptionForChoice(i));
2082 std::string Experiment::NameForChoice(int index) const {
2083 DCHECK(type == Experiment::MULTI_VALUE ||
2084 type == Experiment::ENABLE_DISABLE_VALUE);
2090 base::string16 Experiment::DescriptionForChoice(int index) const {
2091 DCHECK(type == Experiment::MULTI_VALUE ||
2092 type == Experiment::ENABLE_DISABLE_VALUE);
2095 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2140 const Experiment& experiment = experiments[i];
2141 if (SkipConditionalExperiment(experiment))
2145 data->SetString("internal_name", experiment.internal_name);
2147 l10n_util::GetStringUTF16(experiment.visible_name_id));
2150 experiment.visible_description_id));
2153 AddOsStrings(experiment.supported_platforms, supported_platforms);
2156 switch (experiment.type) {
2157 case Experiment::SINGLE_VALUE:
2160 enabled_experiments.count(experiment.internal_name) > 0);
2162 case Experiment::MULTI_VALUE:
2163 case Experiment::ENABLE_DISABLE_VALUE:
2164 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2170 bool supported = (experiment.supported_platforms & current_platform) != 0;
2173 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2264 const Experiment& e = experiments[i];
2265 if (e.type == Experiment::SINGLE_VALUE) {
2268 } else if (e.type == Experiment::MULTI_VALUE) {
2276 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2329 // We're being asked to enable a multi-choice experiment. Disable the
2348 const Experiment* e = NULL;
2357 if (e->type == Experiment::SINGLE_VALUE) {
2375 // experiment for this choice was enabled.
2416 void SetExperiments(const Experiment* e, size_t count) {
2426 const Experiment* GetExperiments(size_t* count) {