[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 5 | #include "chrome/browser/about_flags.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 6 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 7 | #include <iterator> |
| 8 | #include <map> |
| 9 | #include <set> |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 10 | #include <utility> |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 11 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 12 | #include "base/command_line.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 13 | #include "base/memory/singleton.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 14 | #include "base/metrics/sparse_histogram.h" |
| 15 | #include "base/numerics/safe_conversions.h" |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 16 | #include "base/stl_util.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 17 | #include "base/strings/string_number_conversions.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 18 | #include "base/strings/string_util.h" |
[email protected] | 135cb80 | 2013-06-09 16:44:20 | [diff] [blame] | 19 | #include "base/strings/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 20 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 21 | #include "cc/base/switches.h" |
[email protected] | 1153455 | 2013-12-05 02:09:30 | [diff] [blame] | 22 | #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 23 | #include "chrome/browser/flags_storage.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 24 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 25 | #include "chrome/common/chrome_switches.h" |
[email protected] | af39f00 | 2014-08-22 10:18:18 | [diff] [blame] | 26 | #include "chrome/grit/generated_resources.h" |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 27 | #include "components/autofill/core/common/autofill_switches.h" |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 28 | #include "components/cloud_devices/common/cloud_devices_switches.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 29 | #include "components/metrics/metrics_hashes.h" |
[email protected] | cbb22eb | 2013-06-24 23:53:10 | [diff] [blame] | 30 | #include "components/nacl/common/nacl_switches.h" |
[email protected] | 720b1049 | 2014-07-23 08:48:40 | [diff] [blame] | 31 | #include "components/search/search_switches.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 32 | #include "content/public/browser/user_metrics.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 33 | #include "media/base/media_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 34 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 35 | #include "ui/base/ui_base_switches.h" |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 36 | #include "ui/display/display_switches.h" |
[email protected] | a6147a2 | 2013-09-26 06:55:09 | [diff] [blame] | 37 | #include "ui/events/event_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 38 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 39 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 40 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | e3d512a7 | 2014-03-18 20:50:47 | [diff] [blame] | 41 | #include "ui/native_theme/native_theme_switches.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 42 | #include "ui/views/views_switches.h" |
[email protected] | 9a22457 | 2013-05-12 23:08:56 | [diff] [blame] | 43 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 44 | #if defined(OS_ANDROID) |
| 45 | #include "chrome/common/chrome_version_info.h" |
| 46 | #include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h" |
[email protected] | 4c583b6 | 2014-08-08 10:37:23 | [diff] [blame] | 47 | #include "components/omnibox/omnibox_switches.h" |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 48 | #else |
| 49 | #include "ui/message_center/message_center_switches.h" |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 50 | #endif |
| 51 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 52 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 53 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 54 | #endif |
| 55 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 56 | #if defined(OS_CHROMEOS) |
| 57 | #include "chromeos/chromeos_switches.h" |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 58 | #include "third_party/cros_system_api/switches/chrome_switches.h" |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 59 | #endif |
| 60 | |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 61 | #if defined(ENABLE_APP_LIST) |
| 62 | #include "ui/app_list/app_list_switches.h" |
| 63 | #endif |
| 64 | |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 65 | #if defined(ENABLE_EXTENSIONS) |
| 66 | #include "extensions/common/switches.h" |
| 67 | #endif |
| 68 | |
[email protected] | e6e30ac | 2014-01-13 21:24:39 | [diff] [blame] | 69 | using base::UserMetricsAction; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 70 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 71 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 72 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 73 | const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 74 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 75 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 76 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 77 | Experiment::SINGLE_VALUE, \ |
| 78 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 79 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 80 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 81 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 82 | disable_switch, disable_value) \ |
| 83 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 84 | disable_switch, disable_value, NULL, 3 |
| 85 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 86 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 87 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 88 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 89 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 90 | namespace { |
| 91 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 92 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 93 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 94 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 95 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 96 | // whether the experiment is available on that platform. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 97 | void AddOsStrings(unsigned bitmask, base::ListValue* list) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 98 | struct { |
| 99 | unsigned bit; |
| 100 | const char* const name; |
| 101 | } kBitsToOs[] = { |
| 102 | {kOsMac, "Mac"}, |
| 103 | {kOsWin, "Windows"}, |
| 104 | {kOsLinux, "Linux"}, |
| 105 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 106 | {kOsAndroid, "Android"}, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 107 | {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 108 | }; |
| 109 | for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
| 110 | if (bitmask & kBitsToOs[i].bit) |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 111 | list->Append(new base::StringValue(kBitsToOs[i].name)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 112 | } |
| 113 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 114 | // Convert switch constants to proper CommandLine::StringType strings. |
| 115 | CommandLine::StringType GetSwitchString(const std::string& flag) { |
| 116 | CommandLine cmd_line(CommandLine::NO_PROGRAM); |
| 117 | cmd_line.AppendSwitch(flag); |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 118 | DCHECK_EQ(2U, cmd_line.argv().size()); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 119 | return cmd_line.argv()[1]; |
| 120 | } |
| 121 | |
| 122 | // Scoops flags from a command line. |
| 123 | std::set<CommandLine::StringType> ExtractFlagsFromCommandLine( |
| 124 | const CommandLine& cmdline) { |
| 125 | std::set<CommandLine::StringType> flags; |
| 126 | // First do the ones between --flag-switches-begin and --flag-switches-end. |
| 127 | CommandLine::StringVector::const_iterator first = |
| 128 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 129 | GetSwitchString(switches::kFlagSwitchesBegin)); |
| 130 | CommandLine::StringVector::const_iterator last = |
| 131 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 132 | GetSwitchString(switches::kFlagSwitchesEnd)); |
| 133 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 134 | flags.insert(first + 1, last); |
| 135 | #if defined(OS_CHROMEOS) |
| 136 | // Then add those between --policy-switches-begin and --policy-switches-end. |
| 137 | first = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 138 | GetSwitchString(chromeos::switches::kPolicySwitchesBegin)); |
| 139 | last = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 140 | GetSwitchString(chromeos::switches::kPolicySwitchesEnd)); |
| 141 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 142 | flags.insert(first + 1, last); |
| 143 | #endif |
| 144 | return flags; |
| 145 | } |
| 146 | |
piotaixr | bc9cd5f | 2014-08-26 22:24:14 | [diff] [blame] | 147 | const Experiment::Choice kEnableDisplayList2DcanvasChoices[] = { |
| 148 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 149 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 150 | switches::kEnableDisplayList2dCanvas, ""}, |
| 151 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 152 | switches::kDisableDisplayList2dCanvas, ""}, |
| 153 | }; |
| 154 | |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 155 | const Experiment::Choice kEnableCompositingForTransitionChoices[] = { |
| 156 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 157 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 158 | switches::kEnableCompositingForTransition, ""}, |
| 159 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 160 | switches::kDisableCompositingForTransition, ""}, |
| 161 | }; |
| 162 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 163 | const Experiment::Choice kTouchEventsChoices[] = { |
| 164 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 165 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 166 | switches::kTouchEvents, |
| 167 | switches::kTouchEventsEnabled }, |
| 168 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 169 | switches::kTouchEvents, |
| 170 | switches::kTouchEventsDisabled } |
| 171 | }; |
| 172 | |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 173 | #if defined(USE_AURA) |
| 174 | const Experiment::Choice kOverscrollHistoryNavigationChoices[] = { |
| 175 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, |
| 176 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 177 | switches::kOverscrollHistoryNavigation, |
| 178 | "0" }, |
| 179 | { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, |
| 180 | switches::kOverscrollHistoryNavigation, |
| 181 | "2" } |
| 182 | }; |
| 183 | #endif |
[email protected] | 34633be | 2014-06-26 09:05:59 | [diff] [blame] | 184 | #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) |
| 185 | const Experiment::Choice kDeviceScaleFactorChoices[] = { |
| 186 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 187 | { IDS_DEVICE_SCALE_FACTOR_1_1, switches::kForceDeviceScaleFactor, "1.1"}, |
| 188 | { IDS_DEVICE_SCALE_FACTOR_1_2, switches::kForceDeviceScaleFactor, "1.2"}, |
| 189 | { IDS_DEVICE_SCALE_FACTOR_1_25, switches::kForceDeviceScaleFactor, "1.25"}, |
| 190 | { IDS_DEVICE_SCALE_FACTOR_1_3, switches::kForceDeviceScaleFactor, "1.3"}, |
| 191 | { IDS_DEVICE_SCALE_FACTOR_1_4, switches::kForceDeviceScaleFactor, "1.4"}, |
| 192 | { IDS_DEVICE_SCALE_FACTOR_2, switches::kForceDeviceScaleFactor, "2"}, |
| 193 | }; |
| 194 | #endif |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 195 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 196 | #if !defined(DISABLE_NACL) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 197 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 198 | // Secure shell can be used on ChromeOS for forwarding the TCP port opened by |
[email protected] | 402bed6e | 2014-03-07 08:33:09 | [diff] [blame] | 199 | // debug stub to a remote machine. Since secure shell uses NaCl, we usually |
| 200 | // want to avoid debugging that. The PNaCl translator is also a NaCl module, |
| 201 | // so by default we want to avoid debugging that. |
| 202 | // NOTE: As the default value must be the empty string, the mask excluding |
| 203 | // the PNaCl translator and secure shell is substituted elsewhere. |
| 204 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 205 | { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 206 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 207 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 208 | }; |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 209 | #endif |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 210 | |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 211 | const Experiment::Choice kImplSidePaintingChoices[] = { |
| 212 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 213 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 214 | switches::kEnableImplSidePainting, ""}, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 215 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 216 | switches::kDisableImplSidePainting, ""} |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 217 | }; |
| 218 | |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 219 | const Experiment::Choice kLCDTextChoices[] = { |
| 220 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 221 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""}, |
| 222 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""} |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 223 | }; |
| 224 | |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 225 | const Experiment::Choice kDistanceFieldTextChoices[] = { |
| 226 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 227 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 228 | switches::kEnableDistanceFieldText, "" }, |
| 229 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 230 | switches::kDisableDistanceFieldText, "" } |
| 231 | }; |
| 232 | |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 233 | #ifndef USE_AURA |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 234 | const Experiment::Choice kDelegatedRendererChoices[] = { |
| 235 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 236 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 237 | switches::kEnableDelegatedRenderer, ""}, |
| 238 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 239 | switches::kDisableDelegatedRenderer, ""} |
| 240 | }; |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 241 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 242 | |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 243 | const Experiment::Choice kMaxTilesForInterestAreaChoices[] = { |
| 244 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 245 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 246 | cc::switches::kMaxTilesForInterestArea, "64"}, |
| 247 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 248 | cc::switches::kMaxTilesForInterestArea, "128"}, |
| 249 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 250 | cc::switches::kMaxTilesForInterestArea, "256"}, |
| 251 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 252 | cc::switches::kMaxTilesForInterestArea, "512"} |
| 253 | }; |
| 254 | |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 255 | const Experiment::Choice kDefaultTileWidthChoices[] = { |
| 256 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 257 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT, |
| 258 | switches::kDefaultTileWidth, "128"}, |
| 259 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL, |
| 260 | switches::kDefaultTileWidth, "256"}, |
| 261 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE, |
| 262 | switches::kDefaultTileWidth, "512"}, |
| 263 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI, |
| 264 | switches::kDefaultTileWidth, "1024"} |
| 265 | }; |
| 266 | |
| 267 | const Experiment::Choice kDefaultTileHeightChoices[] = { |
| 268 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 269 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT, |
| 270 | switches::kDefaultTileHeight, "128"}, |
| 271 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL, |
| 272 | switches::kDefaultTileHeight, "256"}, |
| 273 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE, |
| 274 | switches::kDefaultTileHeight, "512"}, |
| 275 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI, |
| 276 | switches::kDefaultTileHeight, "1024"} |
| 277 | }; |
| 278 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 279 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
[email protected] | 9a3de3e3 | 2013-04-23 19:05:21 | [diff] [blame] | 280 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 281 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 282 | switches::kUseSimpleCacheBackend, "off" }, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 283 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 284 | switches::kUseSimpleCacheBackend, "on"} |
| 285 | }; |
| 286 | |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 287 | #if defined(USE_AURA) |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 288 | const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 289 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 290 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 291 | switches::kTabCaptureUpscaleQuality, "fast" }, |
| 292 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 293 | switches::kTabCaptureUpscaleQuality, "good" }, |
| 294 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 295 | switches::kTabCaptureUpscaleQuality, "best" }, |
| 296 | }; |
| 297 | |
| 298 | const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 299 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 300 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 301 | switches::kTabCaptureDownscaleQuality, "fast" }, |
| 302 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 303 | switches::kTabCaptureDownscaleQuality, "good" }, |
| 304 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 305 | switches::kTabCaptureDownscaleQuality, "best" }, |
| 306 | }; |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 307 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 308 | |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 309 | #if defined(USE_AURA) || defined(OS_LINUX) |
| 310 | const Experiment::Choice kOverlayScrollbarChoices[] = { |
| 311 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 312 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 313 | switches::kEnableOverlayScrollbar, ""}, |
| 314 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 315 | switches::kDisableOverlayScrollbar, ""} |
| 316 | }; |
| 317 | #endif |
| 318 | |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 319 | const Experiment::Choice kZeroCopyChoices[] = { |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 320 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 321 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 322 | switches::kEnableZeroCopy, ""}, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 323 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 324 | switches::kDisableZeroCopy, ""} |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 325 | }; |
| 326 | |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 327 | #if defined(OS_ANDROID) |
| 328 | const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 329 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 330 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 331 | switches::kEnableZeroSuggestMostVisited, ""}, |
| 332 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, |
| 333 | switches::kEnableZeroSuggestEtherSerp, ""}, |
| 334 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, |
| 335 | switches::kEnableZeroSuggestEtherNoSerp, ""}, |
[email protected] | 162c8d9fa | 2014-03-18 20:25:41 | [diff] [blame] | 336 | { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED, |
| 337 | switches::kEnableZeroSuggestPersonalized, ""}, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 338 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 339 | switches::kDisableZeroSuggest, ""} |
| 340 | }; |
| 341 | #endif |
| 342 | |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 343 | const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 344 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | 00d92d3 | 2014-01-23 09:46:50 | [diff] [blame] | 345 | { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 346 | { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 347 | { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 348 | { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 349 | }; |
| 350 | |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 351 | const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 352 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 353 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 354 | switches::kEnableGpuRasterization, "" }, |
| 355 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 356 | switches::kDisableGpuRasterization, "" }, |
| 357 | { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 358 | switches::kForceGpuRasterization, "" }, |
| 359 | }; |
| 360 | |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 361 | // We're using independent flags here (as opposed to a common flag with |
| 362 | // different values) to be able to enable/disable the entire experience |
| 363 | // associated with this feature server-side from the FieldTrial (the complete |
| 364 | // experience includes other flag changes as well). It is not currently possible |
| 365 | // to do that with "flag=value" flags. |
| 366 | const Experiment::Choice kSearchButtonInOmniboxChoices[] = { |
| 367 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 368 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 369 | switches::kDisableSearchButtonInOmnibox, ""}, |
| 370 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, |
| 371 | switches::kEnableSearchButtonInOmniboxForStr, ""}, |
| 372 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP, |
| 373 | switches::kEnableSearchButtonInOmniboxForStrOrIip, ""}, |
| 374 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED, |
| 375 | switches::kEnableSearchButtonInOmniboxAlways, ""} |
| 376 | }; |
| 377 | |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 378 | // See comment above for kSearchButtonInOmniboxChoices. The same reasoning |
| 379 | // applies here. |
| 380 | const Experiment::Choice kOriginChipChoices[] = { |
| 381 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 382 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""}, |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 383 | { IDS_FLAGS_ORIGIN_CHIP_ALWAYS, switches::kEnableOriginChipAlways, ""}, |
| 384 | { IDS_FLAGS_ORIGIN_CHIP_ON_SRP, switches::kEnableOriginChipOnSrp, ""} |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 385 | }; |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 386 | |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 387 | const Experiment::Choice kTouchScrollingModeChoices[] = { |
| 388 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 389 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL, |
| 390 | switches::kTouchScrollingMode, |
| 391 | switches::kTouchScrollingModeTouchcancel }, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 392 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 393 | switches::kTouchScrollingMode, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 394 | switches::kTouchScrollingModeAsyncTouchmove }, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 395 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE, |
| 396 | switches::kTouchScrollingMode, |
| 397 | switches::kTouchScrollingModeSyncTouchmove }, |
| 398 | }; |
| 399 | |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 400 | #if defined(ENABLE_APP_LIST) |
| 401 | const Experiment::Choice kEnableSyncAppListChoices[] = { |
| 402 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 403 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 404 | app_list::switches::kEnableSyncAppList, "" }, |
| 405 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 406 | app_list::switches::kDisableSyncAppList, "" }, |
| 407 | }; |
| 408 | #endif |
| 409 | |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 410 | const Experiment::Choice kExtensionContentVerificationChoices[] = { |
| 411 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 412 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 413 | switches::kExtensionContentVerification, |
| 414 | switches::kExtensionContentVerificationBootstrap }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 415 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 416 | switches::kExtensionContentVerification, |
| 417 | switches::kExtensionContentVerificationEnforce }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 418 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 419 | switches::kExtensionContentVerification, |
| 420 | switches::kExtensionContentVerificationEnforceStrict }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 421 | }; |
| 422 | |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 423 | #if defined(OS_ANDROID) |
| 424 | const Experiment::Choice kAnswersInSuggestChoices[] = { |
| 425 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 426 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 427 | switches::kEnableAnswersInSuggest, ""}, |
| 428 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 429 | switches::kDisableAnswersInSuggest, ""} |
| 430 | }; |
| 431 | #endif |
| 432 | |
[email protected] | aae7957 | 2014-06-13 00:42:58 | [diff] [blame] | 433 | const Experiment::Choice kEnableSettingsWindowChoices[] = { |
| 434 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 435 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 436 | ::switches::kEnableSettingsWindow, "" }, |
| 437 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 438 | ::switches::kDisableSettingsWindow, "" }, |
| 439 | }; |
| 440 | |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 441 | // Note that the value is specified in seconds (where 0 is equivalent to |
| 442 | // disabled). |
| 443 | const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = { |
| 444 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 445 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 446 | switches::kRememberCertErrorDecisions, |
| 447 | "-1" }, |
| 448 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY, |
| 449 | switches::kRememberCertErrorDecisions, |
| 450 | "86400" }, |
| 451 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS, |
| 452 | switches::kRememberCertErrorDecisions, |
| 453 | "259200" }, |
| 454 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK, |
| 455 | switches::kRememberCertErrorDecisions, |
| 456 | "604800" }, |
| 457 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 458 | switches::kRememberCertErrorDecisions, |
| 459 | "2592000" }, |
| 460 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS, |
| 461 | switches::kRememberCertErrorDecisions, |
| 462 | "7776000" }, |
| 463 | }; |
| 464 | |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 465 | const Experiment::Choice kEnableDropSyncCredentialChoices[] = { |
| 466 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 467 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 468 | password_manager::switches::kEnableDropSyncCredential, "" }, |
| 469 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 470 | password_manager::switches::kDisableDropSyncCredential, "" }, |
| 471 | }; |
| 472 | |
[email protected] | 469ea5c | 2014-08-12 20:00:56 | [diff] [blame] | 473 | #if defined(OS_MACOSX) |
| 474 | const Experiment::Choice kEnableAVFoundationChoices[] = { |
| 475 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 476 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, |
| 477 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} |
| 478 | }; |
| 479 | #endif |
| 480 | |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 481 | const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 482 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 483 | { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 484 | password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 485 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 486 | password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 487 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 488 | password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 489 | }; |
| 490 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 491 | // RECORDING USER METRICS FOR FLAGS: |
| 492 | // ----------------------------------------------------------------------------- |
| 493 | // The first line of the experiment is the internal name. If you'd like to |
| 494 | // gather statistics about the usage of your flag, you should append a marker |
| 495 | // comment to the end of the feature name, like so: |
| 496 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 497 | // |
[email protected] | d8320fb6 | 2014-03-22 03:16:37 | [diff] [blame] | 498 | // After doing that, run |
| 499 | // tools/metrics/actions/extract_actions.py |
| 500 | // to add the metric to actions.xml (which will enable UMA to record your |
| 501 | // feature flag), then update the <owner>s and <description> sections. Make sure |
| 502 | // to include the actions.xml file when you upload your code for review! |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 503 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 504 | // After your feature has shipped under a flag, you can locate the metrics under |
| 505 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 506 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 507 | // get a sense of usage. Note that this will not be the same as number of users |
| 508 | // with a given feature enabled because users can quit and relaunch the |
| 509 | // application multiple times over a given time interval. The dashboard also |
| 510 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 511 | // last seven days. However, note that this is not the same as the number of |
| 512 | // users who have the flag enabled, since enabling the flag happens once, |
| 513 | // whereas running with the flag enabled happens until the user flips the flag |
| 514 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 515 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 516 | // To add a new experiment add to the end of kExperiments. There are two |
| 517 | // distinct types of experiments: |
| 518 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 519 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 520 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 521 | // deactivated state for this lab (i.e. no command line option). To specify |
| 522 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 523 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 524 | // See the documentation of Experiment for details on the fields. |
| 525 | // |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 526 | // Command-line switches must have entries in enum "LoginCustomFlags" in |
| 527 | // histograms.xml. See note in histograms.xml and don't forget to run |
| 528 | // AboutFlagsHistogramTest unit test to calculate and verify checksum. |
| 529 | // |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 530 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 531 | const Experiment kExperiments[] = { |
| 532 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 533 | "ignore-gpu-blacklist", |
| 534 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 535 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 536 | kOsAll, |
| 537 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 538 | }, |
| 539 | { |
[email protected] | 8560336 | 2014-04-21 16:18:14 | [diff] [blame] | 540 | "disable_layer_squashing", |
| 541 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME, |
| 542 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION, |
| 543 | kOsAll, |
| 544 | SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing) |
| 545 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 546 | #if defined(OS_WIN) |
| 547 | { |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 548 | "disable-direct-write", |
| 549 | IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME, |
| 550 | IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 551 | kOsWin, |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 552 | SINGLE_VALUE_TYPE(switches::kDisableDirectWrite) |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 553 | }, |
| 554 | #endif |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 555 | { |
[email protected] | 2b60875 | 2013-05-01 03:34:36 | [diff] [blame] | 556 | "enable-experimental-canvas-features", |
| 557 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME, |
| 558 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION, |
| 559 | kOsAll, |
| 560 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures) |
| 561 | }, |
| 562 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 563 | "disable-accelerated-2d-canvas", |
| 564 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 565 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 566 | kOsAll, |
| 567 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 568 | }, |
| 569 | { |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 570 | "enable-display-list-2d-canvas", |
| 571 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME, |
| 572 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION, |
| 573 | kOsAll, |
piotaixr | bc9cd5f | 2014-08-26 22:24:14 | [diff] [blame] | 574 | MULTI_VALUE_TYPE(kEnableDisplayList2DcanvasChoices) |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 575 | }, |
| 576 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 577 | "composited-layer-borders", |
| 578 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 579 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 580 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 581 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 582 | }, |
| 583 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 584 | "show-fps-counter", |
| 585 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 586 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 587 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 588 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 589 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 590 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 591 | "disable-webgl", |
| 592 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 593 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | 6c7784e | 2013-08-01 22:41:28 | [diff] [blame] | 594 | kOsAll, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 595 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 596 | }, |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 597 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 598 | "disable-webrtc", |
| 599 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 600 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 601 | kOsAndroid, |
| 602 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 603 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 604 | #else |
| 605 | SINGLE_VALUE_TYPE("") |
| 606 | #endif |
| 607 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 608 | #if defined(ENABLE_WEBRTC) |
[email protected] | d816ddc | 2013-05-23 14:28:30 | [diff] [blame] | 609 | { |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 610 | "disable-webrtc-hw-decoding", |
| 611 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME, |
| 612 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION, |
[email protected] | 6442b02 | 2013-12-05 11:09:05 | [diff] [blame] | 613 | kOsAndroid | kOsCrOS, |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 614 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding) |
| 615 | }, |
| 616 | { |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 617 | "disable-webrtc-hw-encoding", |
| 618 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME, |
| 619 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION, |
[email protected] | 6998f01f2 | 2013-12-04 09:27:57 | [diff] [blame] | 620 | kOsAndroid | kOsCrOS, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 621 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding) |
| 622 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 623 | #endif |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 624 | #if defined(OS_ANDROID) |
| 625 | { |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 626 | "disable-webaudio", |
| 627 | IDS_FLAGS_DISABLE_WEBAUDIO_NAME, |
| 628 | IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION, |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 629 | kOsAndroid, |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 630 | SINGLE_VALUE_TYPE(switches::kDisableWebAudio) |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 631 | }, |
| 632 | #endif |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 633 | { |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 634 | "enable-compositing-for-transition", |
| 635 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME, |
| 636 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION, |
| 637 | kOsAll, |
| 638 | MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices) |
| 639 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 640 | // Native client is compiled out when DISABLE_NACL is defined. |
| 641 | #if !defined(DISABLE_NACL) |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 642 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 643 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 644 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 645 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 646 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 647 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 648 | }, |
| 649 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 650 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 651 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 652 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 653 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 654 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 655 | }, |
| 656 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 657 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 658 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 659 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 660 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 661 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 662 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 663 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 664 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 665 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 666 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 667 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 668 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 669 | kOsDesktop, |
[email protected] | c8d0299 | 2013-07-31 22:16:51 | [diff] [blame] | 670 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 671 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 672 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 673 | "extensions-on-chrome-urls", |
| 674 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 675 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 676 | kOsAll, |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 677 | SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 678 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 679 | #endif |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 680 | { |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 681 | "enable-fast-unload", |
| 682 | IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, |
| 683 | IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION, |
| 684 | kOsAll, |
| 685 | SINGLE_VALUE_TYPE(switches::kEnableFastUnload) |
| 686 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 687 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 688 | { |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 689 | "enable-app-window-controls", |
| 690 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, |
| 691 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION, |
| 692 | kOsDesktop, |
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 693 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls) |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 694 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 695 | #endif |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 696 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 697 | "disable-hyperlink-auditing", |
| 698 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 699 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 700 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 701 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 702 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 703 | #if defined(OS_ANDROID) |
| 704 | { |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 705 | "contextual-search", |
| 706 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH, |
| 707 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION, |
| 708 | kOsAndroid, |
[email protected] | 41d32bb | 2014-05-30 08:26:05 | [diff] [blame] | 709 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, |
| 710 | switches::kDisableContextualSearch) |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 711 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 712 | #endif |
[email protected] | 8cc9e53 | 2013-05-06 21:01:47 | [diff] [blame] | 713 | { |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 714 | "show-autofill-type-predictions", |
| 715 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 716 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 717 | kOsAll, |
[email protected] | e217c563 | 2013-04-12 19:11:48 | [diff] [blame] | 718 | SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions) |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 719 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 720 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 721 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 722 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 723 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 724 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 725 | // On by default for the Mac (different implementation in WebKit). |
[email protected] | a5a5aaf | 2013-12-19 02:10:10 | [diff] [blame] | 726 | kOsLinux, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 727 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 728 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 729 | #if defined(USE_AURA) || defined(OS_LINUX) |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 730 | { |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 731 | "overlay-scrollbars", |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 732 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME, |
| 733 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION, |
| 734 | // Uses the system preference on Mac (a different implementation). |
| 735 | // On Android, this is always enabled. |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 736 | kOsLinux | kOsCrOS | kOsWin, |
| 737 | MULTI_VALUE_TYPE(kOverlayScrollbarChoices) |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 738 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 739 | #endif |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 740 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 741 | "enable-panels", |
| 742 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 743 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 744 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 745 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 746 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 747 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 748 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 749 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 750 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 751 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 752 | kOsMac | kOsWin | kOsLinux, |
| 753 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 754 | }, |
| 755 | { |
[email protected] | 903e6338 | 2013-06-01 00:40:58 | [diff] [blame] | 756 | "enable-quic", |
| 757 | IDS_FLAGS_ENABLE_QUIC_NAME, |
| 758 | IDS_FLAGS_ENABLE_QUIC_DESCRIPTION, |
| 759 | kOsAll, |
| 760 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, |
| 761 | switches::kDisableQuic) |
| 762 | }, |
| 763 | { |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 764 | "enable-spdy4", |
| 765 | IDS_FLAGS_ENABLE_SPDY4_NAME, |
| 766 | IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION, |
[email protected] | bca09b998 | 2013-06-27 22:30:46 | [diff] [blame] | 767 | kOsAll, |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 768 | SINGLE_VALUE_TYPE(switches::kEnableSpdy4) |
[email protected] | 88a33262 | 2013-07-30 07:13:32 | [diff] [blame] | 769 | }, |
| 770 | { |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 771 | "enable-async-dns", |
| 772 | IDS_FLAGS_ENABLE_ASYNC_DNS_NAME, |
| 773 | IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION, |
[email protected] | 85594c14 | 2012-09-11 18:02:46 | [diff] [blame] | 774 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 775 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns, |
| 776 | switches::kDisableAsyncDns) |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 777 | }, |
| 778 | { |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 779 | "disable-media-source", |
| 780 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 781 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 782 | kOsAll, |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 783 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 722b4d484f | 2013-10-08 20:33:59 | [diff] [blame] | 784 | }, |
| 785 | { |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 786 | "enable-encrypted-media", |
| 787 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME, |
| 788 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 789 | kOsAll, |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 790 | SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia) |
| 791 | }, |
| 792 | { |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 793 | "disable-prefixed-encrypted-media", |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 794 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME, |
| 795 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 796 | kOsAll, |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 797 | SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 798 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 799 | #if defined(OS_ANDROID) |
| 800 | { |
[email protected] | 3c56ec1 | 2013-09-25 02:03:42 | [diff] [blame] | 801 | "disable-infobar-for-protected-media-identifier", |
| 802 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME, |
| 803 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION, |
| 804 | kOsAndroid, |
| 805 | SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier) |
| 806 | }, |
| 807 | { |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 808 | "mediadrm-enable-non-compositing", |
| 809 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME, |
| 810 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION, |
| 811 | kOsAndroid, |
| 812 | SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing) |
| 813 | }, |
| 814 | #endif // defined(OS_ANDROID) |
[email protected] | d21ead4 | 2013-06-24 06:35:06 | [diff] [blame] | 815 | { |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 816 | "enable-javascript-harmony", |
| 817 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 818 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 819 | kOsAll, |
| 820 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony") |
| 821 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 822 | { |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 823 | "disable-software-rasterizer", |
| 824 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 825 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 826 | #if defined(ENABLE_SWIFTSHADER) |
| 827 | kOsAll, |
| 828 | #else |
| 829 | 0, |
| 830 | #endif |
| 831 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 832 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 833 | { |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 834 | "enable-gpu-rasterization", |
| 835 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 836 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
[email protected] | 96d25e2 | 2014-03-04 05:56:18 | [diff] [blame] | 837 | kOsAndroid, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 838 | MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 839 | }, |
| 840 | { |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 841 | "enable-experimental-web-platform-features", |
| 842 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 843 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 844 | kOsAll, |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 845 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 846 | }, |
| 847 | { |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 848 | "disable-ntp-other-sessions-menu", |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 849 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME, |
| 850 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 851 | kOsDesktop, |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 852 | SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu) |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 853 | }, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 854 | { |
[email protected] | 2b8290d | 2014-08-02 00:29:36 | [diff] [blame] | 855 | "enable-material-design-ntp", |
| 856 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME, |
| 857 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION, |
| 858 | kOsDesktop, |
| 859 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP, |
| 860 | switches::kDisableMaterialDesignNTP) |
| 861 | }, |
| 862 | { |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 863 | "enable-devtools-experiments", |
| 864 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 865 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 866 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 867 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 868 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 869 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 870 | "silent-debugger-extension-api", |
| 871 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 872 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 873 | kOsDesktop, |
| 874 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 875 | }, |
| 876 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 877 | "spellcheck-autocorrect", |
| 878 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 879 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 880 | kOsWin | kOsLinux | kOsCrOS, |
| 881 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 882 | }, |
| 883 | { |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 884 | "enable-scroll-prediction", |
| 885 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME, |
| 886 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION, |
| 887 | kOsDesktop, |
| 888 | SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction) |
| 889 | }, |
| 890 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 891 | "touch-events", |
| 892 | IDS_TOUCH_EVENTS_NAME, |
| 893 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 894 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 895 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 896 | }, |
| 897 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 898 | "disable-touch-adjustment", |
| 899 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 900 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
| 901 | kOsWin | kOsLinux | kOsCrOS, |
| 902 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 903 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 904 | #if defined(OS_CHROMEOS) |
| 905 | { |
[email protected] | 81f89e9 | 2014-02-21 14:27:35 | [diff] [blame] | 906 | "network-portal-notification", |
| 907 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME, |
| 908 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION, |
| 909 | kOsCrOS, |
| 910 | ENABLE_DISABLE_VALUE_TYPE( |
| 911 | chromeos::switches::kEnableNetworkPortalNotification, |
| 912 | chromeos::switches::kDisableNetworkPortalNotification) |
| 913 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 914 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 915 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 916 | "enable-download-resumption", |
| 917 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 918 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 919 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 920 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 921 | }, |
[email protected] | 67fe364 | 2014-08-05 00:00:42 | [diff] [blame] | 922 | #if defined(ENABLE_PLUGINS) |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 923 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 924 | "allow-nacl-socket-api", |
| 925 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 926 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 927 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 928 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 929 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 930 | #endif |
[email protected] | 34633be | 2014-06-26 09:05:59 | [diff] [blame] | 931 | #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 932 | { |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 933 | "force-device-scale-factor", |
[email protected] | 34633be | 2014-06-26 09:05:59 | [diff] [blame] | 934 | IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_NAME, |
| 935 | IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_DESCRIPTION, |
| 936 | kOsLinux | kOsWin | kOsCrOS, |
| 937 | MULTI_VALUE_TYPE(kDeviceScaleFactorChoices) |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 938 | }, |
[email protected] | 34633be | 2014-06-26 09:05:59 | [diff] [blame] | 939 | #endif |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 940 | #if defined(OS_CHROMEOS) |
| 941 | { |
| 942 | "allow-touchpad-three-finger-click", |
| 943 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 944 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 945 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 946 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick) |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 947 | }, |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 948 | { |
| 949 | "enable-easy-signin", |
| 950 | IDS_FLAGS_ENABLE_EASY_SIGNIN_NAME, |
| 951 | IDS_FLAGS_ENABLE_EASY_SIGNIN_DESCRIPTION, |
| 952 | kOsCrOSOwnerOnly, |
| 953 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableEasySignin), |
| 954 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 955 | #endif |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 956 | #if defined(USE_ASH) |
| 957 | { |
[email protected] | 2ddf37b | 2013-04-20 01:15:58 | [diff] [blame] | 958 | "disable-minimize-on-second-launcher-item-click", |
| 959 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME, |
| 960 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION, |
| 961 | kOsAll, |
| 962 | SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick) |
| 963 | }, |
| 964 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 965 | "show-touch-hud", |
| 966 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 967 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 968 | kOsAll, |
| 969 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 970 | }, |
| 971 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 972 | "enable-pinch", |
| 973 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 974 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 975 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 976 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 977 | }, |
[email protected] | adcdcdd0 | 2014-04-25 03:30:24 | [diff] [blame] | 978 | #endif // defined(USE_ASH) |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 979 | { |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 980 | "enable-pinch-virtual-viewport", |
| 981 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME, |
| 982 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION, |
[email protected] | fe89d82 | 2014-04-28 10:29:00 | [diff] [blame] | 983 | kOsLinux | kOsWin | kOsCrOS | kOsAndroid, |
| 984 | ENABLE_DISABLE_VALUE_TYPE( |
| 985 | cc::switches::kEnablePinchVirtualViewport, |
| 986 | cc::switches::kDisablePinchVirtualViewport), |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 987 | }, |
[email protected] | 68bc37c | 2014-01-07 15:56:48 | [diff] [blame] | 988 | { |
| 989 | "enable-viewport-meta", |
| 990 | IDS_FLAGS_ENABLE_VIEWPORT_META_NAME, |
| 991 | IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION, |
| 992 | kOsLinux | kOsWin | kOsCrOS | kOsMac, |
| 993 | SINGLE_VALUE_TYPE(switches::kEnableViewportMeta), |
| 994 | }, |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 995 | #if defined(OS_CHROMEOS) |
| 996 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 997 | "disable-boot-animation", |
| 998 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 999 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 1000 | kOsCrOSOwnerOnly, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1001 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation), |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1002 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 1003 | { |
[email protected] | d739c1db | 2014-07-08 07:19:59 | [diff] [blame] | 1004 | "enable-video-player-chromecast-support", |
| 1005 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME, |
| 1006 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION, |
| 1007 | kOsCrOS, |
| 1008 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport) |
| 1009 | }, |
| 1010 | { |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1011 | "disable-office-editing-component-app", |
| 1012 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME, |
| 1013 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION, |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1014 | kOsCrOS, |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1015 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp), |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1016 | }, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1017 | { |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 1018 | "disable-display-color-calibration", |
| 1019 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, |
| 1020 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, |
| 1021 | kOsCrOS, |
| 1022 | SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), |
| 1023 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1024 | #endif // defined(OS_CHROMEOS) |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1025 | { "disable-accelerated-video-decode", |
| 1026 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1027 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
[email protected] | 33e98a85 | 2013-04-26 05:14:19 | [diff] [blame] | 1028 | kOsWin | kOsCrOS, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1029 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1030 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1031 | #if defined(USE_ASH) |
[email protected] | 35c9a4e | 2013-09-14 01:32:38 | [diff] [blame] | 1032 | { |
| 1033 | "ash-debug-shortcuts", |
| 1034 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1035 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1036 | kOsAll, |
| 1037 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1038 | }, |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 1039 | { "ash-enable-touch-view-testing", |
| 1040 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME, |
| 1041 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION, |
| 1042 | kOsCrOS, |
| 1043 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting), |
| 1044 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1045 | { |
| 1046 | "ash-enable-touch-view-touch-feedback", |
| 1047 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TOUCH_FEEDBACK_NAME, |
| 1048 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TOUCH_FEEDBACK_DESCRIPTION, |
| 1049 | kOsCrOS, |
| 1050 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTouchFeedback), |
| 1051 | }, |
[email protected] | 8847487 | 2014-07-04 22:51:06 | [diff] [blame] | 1052 | { "ash-disable-text-filtering-in-overview-mode", |
| 1053 | IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME, |
| 1054 | IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION, |
| 1055 | kOsCrOS, |
| 1056 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode), |
| 1057 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1058 | #endif // defined(USE_ASH) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1059 | #if defined(OS_CHROMEOS) |
| 1060 | { |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1061 | "enable-carrier-switching", |
| 1062 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING, |
| 1063 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION, |
| 1064 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1065 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching) |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1066 | }, |
| 1067 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1068 | "enable-request-tablet-site", |
| 1069 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1070 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1071 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1072 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1073 | }, |
| 1074 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1075 | { |
| 1076 | "debug-packed-apps", |
| 1077 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1078 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1079 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1080 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1081 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1082 | { |
| 1083 | "enable-password-generation", |
| 1084 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1085 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
[email protected] | d4855d3 | 2014-08-22 18:34:53 | [diff] [blame] | 1086 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | c3cc063 | 2013-10-03 21:54:43 | [diff] [blame] | 1087 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration, |
| 1088 | autofill::switches::kDisablePasswordGeneration) |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1089 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1090 | { |
[email protected] | 0477c06 | 2014-04-30 15:02:18 | [diff] [blame] | 1091 | "enable-automatic-password-saving", |
| 1092 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME, |
| 1093 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION, |
| 1094 | kOsDesktop, |
| 1095 | SINGLE_VALUE_TYPE( |
| 1096 | password_manager::switches::kEnableAutomaticPasswordSaving) |
| 1097 | }, |
| 1098 | { |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1099 | "password-manager-reauthentication", |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1100 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME, |
| 1101 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION, |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 1102 | kOsMac | kOsWin, |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1103 | SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1104 | }, |
| 1105 | { |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1106 | "enable-android-password-link", |
| 1107 | IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_NAME, |
| 1108 | IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_DESCRIPTION, |
| 1109 | kOsAndroid, |
| 1110 | ENABLE_DISABLE_VALUE_TYPE( |
| 1111 | password_manager::switches::kEnableAndroidPasswordLink, |
| 1112 | password_manager::switches::kDisableAndroidPasswordLink) |
| 1113 | }, |
| 1114 | { |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1115 | "enable-deferred-image-decoding", |
| 1116 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME, |
| 1117 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1118 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1119 | SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding) |
| 1120 | }, |
| 1121 | { |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1122 | "wallet-service-use-sandbox", |
| 1123 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
| 1124 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, |
[email protected] | d4d5999 | 2014-06-04 23:48:07 | [diff] [blame] | 1125 | kOsAndroid | kOsDesktop, |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1126 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1127 | autofill::switches::kWalletServiceUseSandbox, "1", |
| 1128 | autofill::switches::kWalletServiceUseSandbox, "0") |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1129 | }, |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1130 | #if defined(USE_AURA) |
| 1131 | { |
| 1132 | "overscroll-history-navigation", |
| 1133 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
| 1134 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, |
| 1135 | kOsAll, |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 1136 | MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices) |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1137 | }, |
| 1138 | #endif |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1139 | { |
[email protected] | 888878e8 | 2013-07-24 22:49:40 | [diff] [blame] | 1140 | "scroll-end-effect", |
| 1141 | IDS_FLAGS_SCROLL_END_EFFECT_NAME, |
| 1142 | IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION, |
| 1143 | kOsCrOS, |
| 1144 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1145 | switches::kScrollEndEffect, "1", |
| 1146 | switches::kScrollEndEffect, "0") |
| 1147 | }, |
| 1148 | { |
[email protected] | cc7c069d | 2014-08-07 20:42:05 | [diff] [blame] | 1149 | "enable-renderer-mojo-channel", |
| 1150 | IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME, |
| 1151 | IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION, |
| 1152 | kOsAll, |
| 1153 | SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel) |
| 1154 | }, |
| 1155 | { |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1156 | "enable-touch-drag-drop", |
| 1157 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1158 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1159 | kOsWin | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1160 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop, |
| 1161 | switches::kDisableTouchDragDrop) |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1162 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1163 | { |
| 1164 | "enable-touch-editing", |
| 1165 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1166 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
[email protected] | 877dd94 | 2014-06-06 16:02:01 | [diff] [blame] | 1167 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1168 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing, |
| 1169 | switches::kDisableTouchEditing) |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1170 | }, |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1171 | { |
[email protected] | 06a82ff | 2014-04-25 02:24:46 | [diff] [blame] | 1172 | "enable-suggestions-service", |
| 1173 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME, |
| 1174 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION, |
| 1175 | kOsAndroid | kOsCrOS, |
| 1176 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, |
| 1177 | switches::kDisableSuggestionsService) |
| 1178 | }, |
| 1179 | { |
treib | fd04f15 | 2014-09-08 16:31:06 | [diff] [blame] | 1180 | "enable-supervised-user-blacklist", |
| 1181 | IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME, |
| 1182 | IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION, |
| 1183 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1184 | SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist) |
| 1185 | }, |
| 1186 | { |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1187 | "enable-sync-synced-notifications", |
| 1188 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME, |
| 1189 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4316893 | 2013-05-24 06:35:18 | [diff] [blame] | 1190 | kOsDesktop, |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1191 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications, |
| 1192 | switches::kDisableSyncSyncedNotifications) |
| 1193 | }, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1194 | #if defined(ENABLE_APP_LIST) |
| 1195 | { |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1196 | "enable-sync-app-list", |
| 1197 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME, |
| 1198 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1199 | kOsDesktop, |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1200 | MULTI_VALUE_TYPE(kEnableSyncAppListChoices) |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1201 | }, |
| 1202 | #endif |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1203 | #if defined(OS_MACOSX) |
| 1204 | { |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1205 | "enable-avfoundation", |
| 1206 | IDS_FLAGS_ENABLE_AVFOUNDATION_NAME, |
| 1207 | IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1208 | kOsMac, |
[email protected] | 469ea5c | 2014-08-12 20:00:56 | [diff] [blame] | 1209 | MULTI_VALUE_TYPE(kEnableAVFoundationChoices) |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1210 | }, |
| 1211 | #endif |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1212 | { |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1213 | "impl-side-painting", |
| 1214 | IDS_FLAGS_IMPL_SIDE_PAINTING_NAME, |
| 1215 | IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1216 | kOsAll, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1217 | MULTI_VALUE_TYPE(kImplSidePaintingChoices) |
| 1218 | }, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1219 | { |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1220 | "lcd-text-aa", |
| 1221 | IDS_FLAGS_LCD_TEXT_NAME, |
| 1222 | IDS_FLAGS_LCD_TEXT_DESCRIPTION, |
| 1223 | kOsDesktop, |
| 1224 | MULTI_VALUE_TYPE(kLCDTextChoices) |
| 1225 | }, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1226 | #if defined(OS_ANDROID) || defined(OS_MACOSX) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1227 | { |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1228 | "delegated-renderer", |
| 1229 | IDS_FLAGS_DELEGATED_RENDERER_NAME, |
| 1230 | IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1231 | kOsAndroid, // TODO(ccameron) Add mac support soon. |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1232 | MULTI_VALUE_TYPE(kDelegatedRendererChoices) |
| 1233 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1234 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1235 | { |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1236 | "max-tiles-for-interest-area", |
| 1237 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME, |
| 1238 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1239 | kOsAll, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1240 | MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices) |
| 1241 | }, |
[email protected] | 7cf7ccb | 2013-04-20 02:53:08 | [diff] [blame] | 1242 | { |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1243 | "enable-offline-auto-reload", |
| 1244 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME, |
| 1245 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION, |
| 1246 | kOsAll, |
[email protected] | bd519e3 | 2014-05-09 01:33:17 | [diff] [blame] | 1247 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload, |
| 1248 | switches::kDisableOfflineAutoReload) |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1249 | }, |
| 1250 | { |
[email protected] | d2e1a0a | 2014-06-16 15:49:37 | [diff] [blame] | 1251 | "enable-offline-auto-reload-visible-only", |
| 1252 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME, |
| 1253 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION, |
| 1254 | kOsAll, |
| 1255 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly, |
| 1256 | switches::kDisableOfflineAutoReloadVisibleOnly) |
| 1257 | }, |
| 1258 | { |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1259 | "enable-offline-load-stale-cache", |
| 1260 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME, |
| 1261 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION, |
| 1262 | kOsLinux | kOsMac | kOsWin | kOsAndroid, |
[email protected] | e83140a0 | 2014-05-07 14:04:58 | [diff] [blame] | 1263 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache, |
| 1264 | switches::kDisableOfflineLoadStaleCache) |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1265 | }, |
| 1266 | { |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1267 | "default-tile-width", |
| 1268 | IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME, |
| 1269 | IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION, |
| 1270 | kOsAll, |
| 1271 | MULTI_VALUE_TYPE(kDefaultTileWidthChoices) |
| 1272 | }, |
| 1273 | { |
| 1274 | "default-tile-height", |
| 1275 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME, |
| 1276 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION, |
| 1277 | kOsAll, |
| 1278 | MULTI_VALUE_TYPE(kDefaultTileHeightChoices) |
| 1279 | }, |
[email protected] | 2289b43 | 2014-08-08 17:52:11 | [diff] [blame] | 1280 | #if defined(OS_ANDROID) |
| 1281 | { |
| 1282 | "disable-gesture-requirement-for-media-playback", |
| 1283 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1284 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1285 | kOsAndroid, |
| 1286 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1287 | }, |
| 1288 | #endif |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1289 | #if defined(OS_CHROMEOS) |
| 1290 | { |
| 1291 | "enable-virtual-keyboard", |
| 1292 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1293 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1294 | kOsCrOS, |
| 1295 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1296 | }, |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1297 | { |
[email protected] | bb6378fe | 2014-04-28 21:19:44 | [diff] [blame] | 1298 | "enable-virtual-keyboard-overscroll", |
| 1299 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME, |
| 1300 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION, |
| 1301 | kOsCrOS, |
| 1302 | ENABLE_DISABLE_VALUE_TYPE( |
| 1303 | keyboard::switches::kEnableVirtualKeyboardOverscroll, |
| 1304 | keyboard::switches::kDisableVirtualKeyboardOverscroll) |
| 1305 | }, |
| 1306 | { |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1307 | "enable-swipe-selection", |
| 1308 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME, |
| 1309 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION, |
| 1310 | kOsCrOS, |
| 1311 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection) |
| 1312 | }, |
[email protected] | 0e627fb1 | 2014-03-25 18:18:53 | [diff] [blame] | 1313 | { |
| 1314 | "enable-input-view", |
| 1315 | IDS_FLAGS_ENABLE_INPUT_VIEW_NAME, |
| 1316 | IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION, |
| 1317 | kOsCrOS, |
| 1318 | ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView, |
| 1319 | keyboard::switches::kDisableInputView) |
| 1320 | }, |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1321 | { |
| 1322 | "enable-experimental-input-view-features", |
| 1323 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME, |
| 1324 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION, |
| 1325 | kOsCrOS, |
| 1326 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures) |
| 1327 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1328 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1329 | { |
| 1330 | "enable-simple-cache-backend", |
| 1331 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1332 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
[email protected] | 957cd5a | 2014-03-27 19:54:17 | [diff] [blame] | 1333 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1334 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1335 | }, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1336 | { |
| 1337 | "enable-tcp-fast-open", |
| 1338 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME, |
| 1339 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION, |
[email protected] | d0a8a16 | 2013-04-13 01:37:11 | [diff] [blame] | 1340 | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1341 | SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen) |
| 1342 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1343 | #if defined(ENABLE_SERVICE_DISCOVERY) |
[email protected] | a4ed7e1 | 2013-05-24 01:00:28 | [diff] [blame] | 1344 | { |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1345 | "device-discovery-notifications", |
| 1346 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME, |
| 1347 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1348 | kOsDesktop, |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1349 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications, |
| 1350 | switches::kDisableDeviceDiscoveryNotifications) |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1351 | }, |
[email protected] | 53ffe0d | 2013-10-30 01:20:40 | [diff] [blame] | 1352 | { |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1353 | "enable-cloud-devices", |
| 1354 | IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME, |
| 1355 | IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION, |
| 1356 | kOsDesktop, |
| 1357 | SINGLE_VALUE_TYPE(switches::kEnableCloudDevices) |
| 1358 | }, |
| 1359 | { |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1360 | "enable-print-preview-register-promos", |
| 1361 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME, |
| 1362 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1363 | kOsDesktop, |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1364 | SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos) |
| 1365 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1366 | #endif // ENABLE_SERVICE_DISCOVERY |
[email protected] | ca53b14 | 2014-02-25 22:42:23 | [diff] [blame] | 1367 | #if defined(OS_WIN) |
| 1368 | { |
| 1369 | "enable-cloud-print-xps", |
| 1370 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME, |
| 1371 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION, |
| 1372 | kOsWin, |
| 1373 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps) |
| 1374 | }, |
| 1375 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 1376 | #if defined(USE_AURA) |
| 1377 | { |
| 1378 | "tab-capture-upscale-quality", |
| 1379 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1380 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1381 | kOsAll, |
| 1382 | MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1383 | }, |
| 1384 | { |
| 1385 | "tab-capture-downscale-quality", |
| 1386 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1387 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1388 | kOsAll, |
| 1389 | MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1390 | }, |
| 1391 | #endif |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1392 | { |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1393 | "enable-spelling-feedback-field-trial", |
| 1394 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME, |
| 1395 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION, |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1396 | kOsAll, |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1397 | SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial) |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1398 | }, |
| 1399 | { |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1400 | "enable-webgl-draft-extensions", |
| 1401 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME, |
| 1402 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION, |
| 1403 | kOsAll, |
| 1404 | SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions) |
| 1405 | }, |
[email protected] | deadc49 | 2013-06-07 21:39:28 | [diff] [blame] | 1406 | { |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1407 | "enable-web-midi", |
| 1408 | IDS_FLAGS_ENABLE_WEB_MIDI_NAME, |
| 1409 | IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION, |
[email protected] | 28e56e9 | 2014-01-03 07:52:39 | [diff] [blame] | 1410 | kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1411 | SINGLE_VALUE_TYPE(switches::kEnableWebMIDI) |
| 1412 | }, |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1413 | { |
| 1414 | "enable-new-profile-management", |
| 1415 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME, |
| 1416 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION, |
[email protected] | a3b75bd | 2014-05-28 17:49:42 | [diff] [blame] | 1417 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1418 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement, |
| 1419 | switches::kDisableNewProfileManagement) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1420 | }, |
| 1421 | { |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1422 | "enable-account-consistency", |
| 1423 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME, |
| 1424 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION, |
| 1425 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1426 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency, |
| 1427 | switches::kDisableAccountConsistency) |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1428 | }, |
| 1429 | { |
[email protected] | 8f56988 | 2014-03-25 21:12:12 | [diff] [blame] | 1430 | "enable-fast-user-switching", |
| 1431 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME, |
| 1432 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION, |
| 1433 | kOsMac | kOsWin | kOsLinux, |
| 1434 | SINGLE_VALUE_TYPE(switches::kFastUserSwitching) |
| 1435 | }, |
| 1436 | { |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1437 | "enable-new-avatar-menu", |
| 1438 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME, |
| 1439 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION, |
| 1440 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 9152a54 | 2014-08-06 05:37:45 | [diff] [blame] | 1441 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu, |
| 1442 | switches::kDisableNewAvatarMenu) |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1443 | }, |
| 1444 | { |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1445 | "enable-web-based-signin", |
| 1446 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME, |
| 1447 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION, |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1448 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1449 | SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin) |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1450 | }, |
| 1451 | { |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1452 | "enable-google-profile-info", |
| 1453 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME, |
| 1454 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION, |
[email protected] | a9bf7d6 | 2013-07-11 22:11:22 | [diff] [blame] | 1455 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1456 | SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1457 | }, |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1458 | { |
[email protected] | 056ed709 | 2014-01-09 12:57:21 | [diff] [blame] | 1459 | "reset-app-list-install-state", |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1460 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME, |
| 1461 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION, |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1462 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1463 | SINGLE_VALUE_TYPE(switches::kResetAppListInstallState) |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1464 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1465 | #if defined(ENABLE_APP_LIST) |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1466 | #if defined(OS_LINUX) |
| 1467 | { |
| 1468 | // This is compiled out on non-Linux platforms because otherwise it would be |
| 1469 | // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing. |
| 1470 | // TODO(mgiuca): Remove the #if when Aura is the default on Linux. |
| 1471 | "enable-app-list", |
| 1472 | IDS_FLAGS_ENABLE_APP_LIST_NAME, |
| 1473 | IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION, |
| 1474 | kOsLinux, |
| 1475 | SINGLE_VALUE_TYPE(switches::kEnableAppList) |
| 1476 | }, |
| 1477 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1478 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 1479 | { |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1480 | "enable-app-view", |
| 1481 | IDS_FLAGS_ENABLE_APP_VIEW_NAME, |
| 1482 | IDS_FLAGS_ENABLE_APP_VIEW_DESCRIPTION, |
fsamuel | bb30da9 | 2014-08-27 21:20:29 | [diff] [blame] | 1483 | kOsDesktop, |
[email protected] | b4ef121 | 2014-08-21 18:31:26 | [diff] [blame] | 1484 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppView) |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1485 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1486 | #endif |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1487 | { |
[email protected] | 9e0a44c | 2014-06-07 14:26:21 | [diff] [blame] | 1488 | "disable-app-list-app-info", |
| 1489 | IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST, |
| 1490 | IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION, |
| 1491 | kOsLinux | kOsWin | kOsCrOS, |
| 1492 | SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo) |
| 1493 | }, |
| 1494 | { |
xiyuan | fde6f25 | 2014-09-12 17:23:48 | [diff] [blame] | 1495 | "disable-drive-apps-in-app-list", |
| 1496 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME, |
| 1497 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION, |
| 1498 | kOsCrOS, |
| 1499 | SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList) |
[email protected] | c30bda26 | 2014-06-19 04:10:13 | [diff] [blame] | 1500 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1501 | #endif |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1502 | #if defined(OS_ANDROID) |
| 1503 | { |
| 1504 | "enable-accessibility-tab-switcher", |
| 1505 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME, |
| 1506 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION, |
| 1507 | kOsAndroid, |
| 1508 | SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher) |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1509 | }, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1510 | { |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1511 | // TODO(dmazzoni): remove this flag when native android accessibility |
| 1512 | // ships in the stable channel. http://crbug.com/356775 |
| 1513 | "enable-accessibility-script-injection", |
| 1514 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME, |
| 1515 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1516 | kOsAndroid, |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1517 | // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION. |
| 1518 | SINGLE_VALUE_TYPE("enable-accessibility-script-injection") |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1519 | }, |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1520 | #endif |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1521 | { |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1522 | "enable-one-copy", |
| 1523 | IDS_FLAGS_ONE_COPY_NAME, |
| 1524 | IDS_FLAGS_ONE_COPY_DESCRIPTION, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 1525 | kOsAll, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1526 | SINGLE_VALUE_TYPE(switches::kEnableOneCopy) |
| 1527 | }, |
| 1528 | { |
| 1529 | "enable-zero-copy", |
| 1530 | IDS_FLAGS_ZERO_COPY_NAME, |
| 1531 | IDS_FLAGS_ZERO_COPY_DESCRIPTION, |
| 1532 | kOsAll, |
| 1533 | MULTI_VALUE_TYPE(kZeroCopyChoices) |
[email protected] | 4fdc518f | 2013-08-28 21:37:27 | [diff] [blame] | 1534 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1535 | #if defined(OS_CHROMEOS) |
| 1536 | { |
[email protected] | 407d82b | 2013-12-13 11:50:59 | [diff] [blame] | 1537 | "enable-first-run-ui-transitions", |
| 1538 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME, |
| 1539 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION, |
| 1540 | kOsCrOS, |
| 1541 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions) |
| 1542 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1543 | #endif |
[email protected] | ed1aab1 | 2013-10-08 14:27:07 | [diff] [blame] | 1544 | { |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1545 | "enable-streamlined-hosted-apps", |
| 1546 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME, |
| 1547 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION, |
[email protected] | abe7f872 | 2013-12-13 11:38:06 | [diff] [blame] | 1548 | kOsWin | kOsCrOS | kOsLinux, |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1549 | SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps) |
| 1550 | }, |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1551 | { |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1552 | "enable-ephemeral-apps", |
| 1553 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME, |
| 1554 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1555 | kOsAll, |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1556 | SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps) |
| 1557 | }, |
| 1558 | { |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1559 | "enable-linkable-ephemeral-apps", |
| 1560 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME, |
| 1561 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1562 | kOsAll, |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1563 | SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps) |
| 1564 | }, |
| 1565 | { |
[email protected] | 7d8056d | 2014-04-14 15:55:21 | [diff] [blame] | 1566 | "enable-service-worker-sync", |
| 1567 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME, |
| 1568 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION, |
| 1569 | kOsAll, |
| 1570 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync) |
| 1571 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1572 | #if defined(OS_ANDROID) |
| 1573 | { |
| 1574 | "disable-click-delay", |
| 1575 | IDS_FLAGS_DISABLE_CLICK_DELAY_NAME, |
| 1576 | IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION, |
| 1577 | kOsAndroid, |
| 1578 | // Java-only switch: CommandLine.DISABLE_CLICK_DELAY |
| 1579 | SINGLE_VALUE_TYPE("disable-click-delay") |
| 1580 | }, |
| 1581 | #endif |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1582 | #if defined(OS_MACOSX) |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1583 | { |
| 1584 | "enable-translate-new-ux", |
| 1585 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME, |
| 1586 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1587 | kOsMac, |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1588 | SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX) |
| 1589 | }, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1590 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1591 | #if defined(TOOLKIT_VIEWS) |
| 1592 | { |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1593 | "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA |
| 1594 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME, |
| 1595 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION, |
[email protected] | 42f5fe54 | 2014-07-25 17:59:33 | [diff] [blame] | 1596 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1597 | SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1598 | }, |
| 1599 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1600 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1601 | { |
| 1602 | "enable-apps-show-on-first-paint", |
| 1603 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, |
| 1604 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION, |
| 1605 | kOsDesktop, |
[email protected] | 6fa20245 | 2014-08-19 05:34:07 | [diff] [blame] | 1606 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1607 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1608 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1609 | { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1610 | "enhanced-bookmarks-experiment", |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1611 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1612 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1613 | kOsDesktop | kOsAndroid, |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1614 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1615 | switches::kEnhancedBookmarksExperiment, "1", |
| 1616 | switches::kEnhancedBookmarksExperiment, "0") |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1617 | }, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1618 | { |
| 1619 | "manual-enhanced-bookmarks", |
| 1620 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1621 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1622 | kOsDesktop | kOsAndroid, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1623 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks) |
| 1624 | }, |
| 1625 | { |
| 1626 | "manual-enhanced-bookmarks-optout", |
| 1627 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1628 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1629 | kOsDesktop | kOsAndroid, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1630 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout) |
| 1631 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1632 | #if defined(OS_ANDROID) |
| 1633 | { |
| 1634 | "enable-zero-suggest-experiment", |
| 1635 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME, |
| 1636 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION, |
| 1637 | kOsAndroid, |
| 1638 | MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices) |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1639 | }, |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1640 | { |
| 1641 | "enable-reader-mode-toolbar-icon", |
| 1642 | IDS_FLAGS_READER_MODE_EXPERIMENT_NAME, |
| 1643 | IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION, |
| 1644 | kOsAndroid, |
| 1645 | SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon) |
| 1646 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1647 | #endif |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1648 | { |
| 1649 | "num-raster-threads", |
| 1650 | IDS_FLAGS_NUM_RASTER_THREADS_NAME, |
| 1651 | IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, |
| 1652 | kOsAll, |
| 1653 | MULTI_VALUE_TYPE(kNumRasterThreadsChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1654 | }, |
| 1655 | { |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 1656 | "origin-chip-in-omnibox", |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1657 | IDS_FLAGS_ORIGIN_CHIP_NAME, |
| 1658 | IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION, |
[email protected] | 393a646 | 2014-04-28 15:28:27 | [diff] [blame] | 1659 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 1660 | MULTI_VALUE_TYPE(kOriginChipChoices) |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 1661 | }, |
| 1662 | { |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1663 | "search-button-in-omnibox", |
| 1664 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME, |
| 1665 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION, |
[email protected] | 266cd0a | 2014-05-07 19:55:05 | [diff] [blame] | 1666 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1667 | MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices) |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1668 | }, |
| 1669 | { |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1670 | "disable-ignore-autocomplete-off", |
| 1671 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME, |
| 1672 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION, |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1673 | kOsAll, |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1674 | SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff) |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1675 | }, |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1676 | { |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1677 | "enable-permissions-bubbles", |
| 1678 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME, |
| 1679 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION, |
[email protected] | 4e6d54a | 2014-06-27 14:32:12 | [diff] [blame] | 1680 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 7d19822 | 2014-06-17 08:24:22 | [diff] [blame] | 1681 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles, |
| 1682 | switches::kDisablePermissionsBubbles) |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1683 | }, |
[email protected] | 4d11b08b | 2014-01-27 22:19:07 | [diff] [blame] | 1684 | { |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1685 | "enable-session-crashed-bubble", |
| 1686 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME, |
| 1687 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION, |
| 1688 | kOsWin | kOsLinux, |
[email protected] | 3d990b7 | 2014-05-27 21:16:13 | [diff] [blame] | 1689 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble, |
| 1690 | switches::kDisableSessionCrashedBubble) |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1691 | }, |
| 1692 | { |
[email protected] | 1231adf | 2014-01-31 02:22:33 | [diff] [blame] | 1693 | "out-of-process-pdf", |
| 1694 | IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME, |
| 1695 | IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION, |
| 1696 | kOsDesktop, |
| 1697 | SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf) |
| 1698 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1699 | #if defined(OS_ANDROID) |
| 1700 | { |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1701 | "disable-cast", |
| 1702 | IDS_FLAGS_DISABLE_CAST_NAME, |
| 1703 | IDS_FLAGS_DISABLE_CAST_DESCRIPTION, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1704 | kOsAndroid, |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1705 | SINGLE_VALUE_TYPE(switches::kDisableCast) |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1706 | }, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1707 | { |
| 1708 | "prefetch-search-results", |
| 1709 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME, |
| 1710 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1711 | kOsAndroid, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1712 | SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults) |
| 1713 | }, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1714 | #endif |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1715 | #if defined(ENABLE_APP_LIST) |
| 1716 | { |
| 1717 | "enable-experimental-app-list", |
| 1718 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, |
| 1719 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, |
| 1720 | kOsWin | kOsLinux | kOsCrOS, |
| 1721 | SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList) |
| 1722 | }, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1723 | { |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1724 | "enable-centered-app-list", |
| 1725 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME, |
| 1726 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1727 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1728 | SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList) |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1729 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1730 | #endif |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 1731 | { |
| 1732 | "touch-scrolling-mode", |
| 1733 | IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME, |
| 1734 | IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION, |
| 1735 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
| 1736 | MULTI_VALUE_TYPE(kTouchScrollingModeChoices) |
| 1737 | }, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1738 | { |
| 1739 | "bleeding-edge-renderer-mode", |
| 1740 | IDS_FLAGS_BLEEDING_RENDERER_NAME, |
| 1741 | IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION, |
[email protected] | a8a9751 | 2014-03-24 18:28:20 | [diff] [blame] | 1742 | kOsAndroid, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1743 | SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths) |
| 1744 | }, |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1745 | { |
| 1746 | "enable-settings-window", |
| 1747 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME, |
| 1748 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION, |
| 1749 | kOsDesktop, |
[email protected] | aae7957 | 2014-06-13 00:42:58 | [diff] [blame] | 1750 | MULTI_VALUE_TYPE(kEnableSettingsWindowChoices) |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1751 | }, |
[email protected] | 812b82a | 2014-05-15 19:01:38 | [diff] [blame] | 1752 | #if defined(OS_ANDROID) |
| 1753 | { |
| 1754 | "enable-instant-search-clicks", |
| 1755 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME, |
| 1756 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION, |
| 1757 | kOsAndroid, |
| 1758 | SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks) |
| 1759 | }, |
| 1760 | #endif |
[email protected] | 4dffb66 | 2014-03-31 11:31:22 | [diff] [blame] | 1761 | { |
| 1762 | "enable-save-password-bubble", |
| 1763 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME, |
| 1764 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION, |
dconnelly | 35f985b3 | 2014-08-29 10:40:55 | [diff] [blame] | 1765 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | ea61c08 | 2014-04-07 16:57:24 | [diff] [blame] | 1766 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble, |
| 1767 | switches::kDisableSavePasswordBubble) |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1768 | }, |
[email protected] | 7fe71f0 | 2014-04-26 00:47:56 | [diff] [blame] | 1769 | // TODO(tyoshino): Remove this temporary flag and command line switch. See |
| 1770 | // crbug.com/366483 for the target milestone. |
| 1771 | { |
| 1772 | "allow-insecure-websocket-from-https-origin", |
| 1773 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME, |
| 1774 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION, |
| 1775 | kOsAll, |
| 1776 | SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin) |
| 1777 | }, |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1778 | { |
| 1779 | "enable-apps-file-associations", |
| 1780 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME, |
| 1781 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION, |
| 1782 | kOsMac, |
| 1783 | SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations) |
| 1784 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1785 | #if defined(OS_ANDROID) |
| 1786 | { |
| 1787 | "enable-embeddedsearch-api", |
| 1788 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME, |
| 1789 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION, |
| 1790 | kOsAndroid, |
| 1791 | SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) |
| 1792 | }, |
[email protected] | 1d134929 | 2014-05-02 05:22:33 | [diff] [blame] | 1793 | { |
| 1794 | "enable-app-install-alerts", |
| 1795 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME, |
| 1796 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION, |
| 1797 | kOsAndroid, |
| 1798 | SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts) |
| 1799 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1800 | #endif |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1801 | { |
| 1802 | "distance-field-text", |
| 1803 | IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME, |
| 1804 | IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION, |
| 1805 | kOsAll, |
| 1806 | MULTI_VALUE_TYPE(kDistanceFieldTextChoices) |
| 1807 | }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 1808 | { |
| 1809 | "extension-content-verification", |
| 1810 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME, |
| 1811 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION, |
| 1812 | kOsDesktop, |
| 1813 | MULTI_VALUE_TYPE(kExtensionContentVerificationChoices) |
| 1814 | }, |
[email protected] | 8f374ce | 2014-05-08 23:51:52 | [diff] [blame] | 1815 | #if defined(USE_AURA) |
| 1816 | { |
| 1817 | "text-input-focus-manager", |
| 1818 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME, |
| 1819 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION, |
| 1820 | kOsCrOS | kOsLinux | kOsWin, |
| 1821 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager, |
| 1822 | switches::kDisableTextInputFocusManager) |
| 1823 | }, |
| 1824 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1825 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9858541 | 2014-05-13 19:01:37 | [diff] [blame] | 1826 | { |
| 1827 | "extension-active-script-permission", |
| 1828 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME, |
| 1829 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION, |
| 1830 | kOsAll, |
| 1831 | SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction) |
| 1832 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1833 | #endif |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1834 | { |
[email protected] | e79cec2 | 2014-07-26 16:20:29 | [diff] [blame] | 1835 | "harfbuzz-rendertext", |
| 1836 | IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME, |
| 1837 | IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION, |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1838 | kOsDesktop, |
[email protected] | e79cec2 | 2014-07-26 16:20:29 | [diff] [blame] | 1839 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText, |
| 1840 | switches::kDisableHarfBuzzRenderText) |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1841 | }, |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1842 | #if defined(OS_ANDROID) |
| 1843 | { |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 1844 | "answers-in-suggest", |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1845 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME, |
| 1846 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION, |
| 1847 | kOsAndroid, |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 1848 | MULTI_VALUE_TYPE(kAnswersInSuggestChoices) |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1849 | }, |
| 1850 | #endif |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 1851 | #if defined(OS_ANDROID) |
| 1852 | { |
| 1853 | "enable-data-reduction-proxy-dev", |
| 1854 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME, |
| 1855 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION, |
| 1856 | kOsAndroid, |
| 1857 | ENABLE_DISABLE_VALUE_TYPE( |
| 1858 | data_reduction_proxy::switches::kEnableDataReductionProxyDev, |
| 1859 | data_reduction_proxy::switches::kDisableDataReductionProxyDev) |
| 1860 | }, |
| 1861 | #endif |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 1862 | { |
[email protected] | 49b05f8 | 2014-08-11 09:16:52 | [diff] [blame] | 1863 | "enable-experimental-hotwording", |
| 1864 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME, |
| 1865 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION, |
| 1866 | kOsDesktop, |
| 1867 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording) |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 1868 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1869 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 409d920 | 2014-07-08 01:32:41 | [diff] [blame] | 1870 | { |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 1871 | "enable-embedded-extension-options", |
| 1872 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 1873 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 1874 | kOsDesktop, |
| 1875 | SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 1876 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1877 | #endif |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 1878 | { |
[email protected] | 3ba3eb71 | 2014-07-16 07:47:19 | [diff] [blame] | 1879 | "enable-website-settings-manager", |
| 1880 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME, |
| 1881 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION, |
| 1882 | kOsDesktop, |
| 1883 | SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager) |
| 1884 | }, |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 1885 | { |
| 1886 | "remember-cert-error-decisions", |
| 1887 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 1888 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 1889 | kOsAll, |
| 1890 | MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 1891 | }, |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 1892 | { |
| 1893 | "enable-drop-sync-credential", |
| 1894 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
| 1895 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
| 1896 | kOsAll, |
| 1897 | MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 1898 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1899 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 1900 | { |
| 1901 | "enable-extension-action-redesign", |
| 1902 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, |
| 1903 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, |
| 1904 | kOsWin | kOsLinux | kOsCrOS, |
| 1905 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) |
| 1906 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame^] | 1907 | #endif |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 1908 | { |
| 1909 | "autofill-sync-credential", |
| 1910 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 1911 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 1912 | kOsAll, |
| 1913 | MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 1914 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 1915 | #if !defined(OS_ANDROID) |
| 1916 | { |
| 1917 | "enable-message-center-always-scroll-up-upon-notification-removal", |
| 1918 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, |
| 1919 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, |
| 1920 | kOsDesktop, |
| 1921 | SINGLE_VALUE_TYPE( |
| 1922 | switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval) |
| 1923 | }, |
| 1924 | #endif |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 1925 | #if defined(OS_CHROMEOS) |
| 1926 | { |
| 1927 | "wake-on-packets", |
| 1928 | IDS_FLAGS_WAKE_ON_PACKETS_NAME, |
| 1929 | IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION, |
| 1930 | kOsCrOSOwnerOnly, |
| 1931 | SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets) |
| 1932 | }, |
| 1933 | #endif // OS_CHROMEOS |
bengr | 2989fef | 2014-09-18 21:47:38 | [diff] [blame] | 1934 | { |
| 1935 | "enable-data-reduction-proxy-alt", |
| 1936 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME, |
| 1937 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION, |
| 1938 | kOsAndroid, |
| 1939 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 1940 | kEnableDataReductionProxyAlt) |
| 1941 | }, |
| 1942 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 1943 | // NOTE: Adding new command-line switches requires adding corresponding |
| 1944 | // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1945 | // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 1946 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1947 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1948 | const Experiment* experiments = kExperiments; |
| 1949 | size_t num_experiments = arraysize(kExperiments); |
| 1950 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1951 | // Stores and encapsulates the little state that about:flags has. |
| 1952 | class FlagsState { |
| 1953 | public: |
| 1954 | FlagsState() : needs_restart_(false) {} |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1955 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 1956 | CommandLine* command_line, |
| 1957 | SentinelsMode sentinels); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1958 | bool IsRestartNeededToCommitChanges(); |
| 1959 | void SetExperimentEnabled( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1960 | FlagsStorage* flags_storage, |
| 1961 | const std::string& internal_name, |
| 1962 | bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1963 | void RemoveFlagsSwitches( |
| 1964 | std::map<std::string, CommandLine::StringType>* switch_list); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1965 | void ResetAllFlags(FlagsStorage* flags_storage); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1966 | void reset(); |
| 1967 | |
| 1968 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1969 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1970 | return Singleton<FlagsState>::get(); |
| 1971 | } |
| 1972 | |
| 1973 | private: |
| 1974 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1975 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1976 | |
| 1977 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 1978 | }; |
| 1979 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1980 | // Adds the internal names for the specified experiment to |names|. |
| 1981 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 1982 | if (e.type == Experiment::SINGLE_VALUE) { |
| 1983 | names->insert(e.internal_name); |
| 1984 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1985 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 1986 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1987 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1988 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1989 | } |
| 1990 | } |
| 1991 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1992 | // Confirms that an experiment is valid, used in a DCHECK in |
| 1993 | // SanitizeList below. |
| 1994 | bool ValidateExperiment(const Experiment& e) { |
| 1995 | switch (e.type) { |
| 1996 | case Experiment::SINGLE_VALUE: |
| 1997 | DCHECK_EQ(0, e.num_choices); |
| 1998 | DCHECK(!e.choices); |
| 1999 | break; |
| 2000 | case Experiment::MULTI_VALUE: |
| 2001 | DCHECK_GT(e.num_choices, 0); |
| 2002 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2003 | DCHECK(e.choices[0].command_line_switch); |
| 2004 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2005 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2006 | case Experiment::ENABLE_DISABLE_VALUE: |
| 2007 | DCHECK_EQ(3, e.num_choices); |
| 2008 | DCHECK(!e.choices); |
| 2009 | DCHECK(e.command_line_switch); |
| 2010 | DCHECK(e.command_line_value); |
| 2011 | DCHECK(e.disable_command_line_switch); |
| 2012 | DCHECK(e.disable_command_line_value); |
| 2013 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2014 | default: |
| 2015 | NOTREACHED(); |
| 2016 | } |
| 2017 | return true; |
| 2018 | } |
| 2019 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2020 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 2021 | // unknown, to prevent this list to become very long as experiments are added |
| 2022 | // and removed. |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2023 | void SanitizeList(FlagsStorage* flags_storage) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2024 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2025 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2026 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2027 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2028 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2029 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2030 | std::set<std::string> enabled_experiments = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2031 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2032 | std::set<std::string> new_enabled_experiments = |
| 2033 | base::STLSetIntersection<std::set<std::string> >( |
| 2034 | known_experiments, enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2035 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2036 | if (new_enabled_experiments != enabled_experiments) |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2037 | flags_storage->SetFlags(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2038 | } |
| 2039 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2040 | void GetSanitizedEnabledFlags( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2041 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2042 | SanitizeList(flags_storage); |
| 2043 | *result = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2044 | } |
| 2045 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2046 | bool SkipConditionalExperiment(const Experiment& experiment) { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2047 | if (experiment.internal_name == |
| 2048 | std::string("enhanced-bookmarks-experiment")) { |
kkimlabs | 948ce92d | 2014-09-09 09:06:42 | [diff] [blame] | 2049 | #if defined(OS_ANDROID) |
| 2050 | // On Android, user can opt in. |
| 2051 | return false; |
| 2052 | #else |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2053 | CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 2054 | // Dont't skip experiment if it has non default value. |
| 2055 | // It means user selected it. |
| 2056 | if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment)) |
| 2057 | return false; |
| 2058 | |
[email protected] | 1153455 | 2013-12-05 02:09:30 | [diff] [blame] | 2059 | return !IsEnhancedBookmarksExperimentEnabled(); |
kkimlabs | 948ce92d | 2014-09-09 09:06:42 | [diff] [blame] | 2060 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2061 | } |
kkimlabs | 948ce92d | 2014-09-09 09:06:42 | [diff] [blame] | 2062 | |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 2063 | if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) || |
| 2064 | (experiment.internal_name == |
| 2065 | std::string("manual-enhanced-bookmarks-optout"))) { |
| 2066 | return true; |
| 2067 | } |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2068 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2069 | #if defined(OS_ANDROID) |
| 2070 | // enable-data-reduction-proxy-dev is only available for the Dev channel. |
| 2071 | if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
| 2072 | chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
| 2073 | return true; |
| 2074 | } |
| 2075 | #endif |
| 2076 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2077 | return false; |
| 2078 | } |
| 2079 | |
| 2080 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2081 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 2082 | // enabled on the current platform. |
| 2083 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2084 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2085 | GetSanitizedEnabledFlags(flags_storage, result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2086 | |
| 2087 | // Filter out any experiments that aren't enabled on the current platform. We |
| 2088 | // don't remove these from prefs else syncing to a platform with a different |
| 2089 | // set of experiments would be lossy. |
| 2090 | std::set<std::string> platform_experiments; |
| 2091 | int current_platform = GetCurrentPlatform(); |
| 2092 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2093 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2094 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 2095 | #if defined(OS_CHROMEOS) |
| 2096 | if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| 2097 | AddInternalName(experiments[i], &platform_experiments); |
| 2098 | #endif |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2099 | } |
| 2100 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2101 | std::set<std::string> new_enabled_experiments = |
| 2102 | base::STLSetIntersection<std::set<std::string> >( |
| 2103 | platform_experiments, *result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2104 | |
| 2105 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2106 | } |
| 2107 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2108 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2109 | base::Value* CreateChoiceData( |
| 2110 | const Experiment& experiment, |
| 2111 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2112 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 2113 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2114 | base::ListValue* result = new base::ListValue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2115 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2116 | base::DictionaryValue* value = new base::DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2117 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2118 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2119 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2120 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2121 | result->Append(value); |
| 2122 | } |
| 2123 | return result; |
| 2124 | } |
| 2125 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2126 | } // namespace |
| 2127 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2128 | std::string Experiment::NameForChoice(int index) const { |
| 2129 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2130 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2131 | DCHECK_LT(index, num_choices); |
| 2132 | return std::string(internal_name) + testing::kMultiSeparator + |
| 2133 | base::IntToString(index); |
| 2134 | } |
| 2135 | |
[email protected] | 9692015 | 2013-12-04 21:00:16 | [diff] [blame] | 2136 | base::string16 Experiment::DescriptionForChoice(int index) const { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2137 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2138 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2139 | DCHECK_LT(index, num_choices); |
| 2140 | int description_id; |
| 2141 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 2142 | const int kEnableDisableDescriptionIds[] = { |
| 2143 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 2144 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 2145 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 2146 | }; |
| 2147 | description_id = kEnableDisableDescriptionIds[index]; |
| 2148 | } else { |
| 2149 | description_id = choices[index].description_id; |
| 2150 | } |
| 2151 | return l10n_util::GetStringUTF16(description_id); |
| 2152 | } |
| 2153 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2154 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2155 | CommandLine* command_line, |
| 2156 | SentinelsMode sentinels) { |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2157 | FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2158 | command_line, |
| 2159 | sentinels); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2160 | } |
| 2161 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2162 | bool AreSwitchesIdenticalToCurrentCommandLine( |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2163 | const CommandLine& new_cmdline, |
| 2164 | const CommandLine& active_cmdline, |
| 2165 | std::set<CommandLine::StringType>* out_difference) { |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2166 | std::set<CommandLine::StringType> new_flags = |
| 2167 | ExtractFlagsFromCommandLine(new_cmdline); |
| 2168 | std::set<CommandLine::StringType> active_flags = |
| 2169 | ExtractFlagsFromCommandLine(active_cmdline); |
| 2170 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2171 | bool result = false; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2172 | // Needed because std::equal doesn't check if the 2nd set is empty. |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2173 | if (new_flags.size() == active_flags.size()) { |
| 2174 | result = |
| 2175 | std::equal(new_flags.begin(), new_flags.end(), active_flags.begin()); |
| 2176 | } |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2177 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2178 | if (out_difference && !result) { |
| 2179 | std::set_symmetric_difference( |
| 2180 | new_flags.begin(), |
| 2181 | new_flags.end(), |
| 2182 | active_flags.begin(), |
| 2183 | active_flags.end(), |
| 2184 | std::inserter(*out_difference, out_difference->begin())); |
| 2185 | } |
| 2186 | |
| 2187 | return result; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2188 | } |
| 2189 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2190 | void GetFlagsExperimentsData(FlagsStorage* flags_storage, |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2191 | FlagAccess access, |
| 2192 | base::ListValue* supported_experiments, |
| 2193 | base::ListValue* unsupported_experiments) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2194 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2195 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2196 | |
| 2197 | int current_platform = GetCurrentPlatform(); |
| 2198 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2199 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2200 | const Experiment& experiment = experiments[i]; |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2201 | if (SkipConditionalExperiment(experiment)) |
| 2202 | continue; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2203 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2204 | base::DictionaryValue* data = new base::DictionaryValue(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2205 | data->SetString("internal_name", experiment.internal_name); |
| 2206 | data->SetString("name", |
| 2207 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 2208 | data->SetString("description", |
| 2209 | l10n_util::GetStringUTF16( |
| 2210 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2211 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2212 | base::ListValue* supported_platforms = new base::ListValue(); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2213 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 2214 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2215 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2216 | switch (experiment.type) { |
| 2217 | case Experiment::SINGLE_VALUE: |
| 2218 | data->SetBoolean( |
| 2219 | "enabled", |
| 2220 | enabled_experiments.count(experiment.internal_name) > 0); |
| 2221 | break; |
| 2222 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2223 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2224 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 2225 | break; |
| 2226 | default: |
| 2227 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2228 | } |
| 2229 | |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2230 | bool supported = (experiment.supported_platforms & current_platform) != 0; |
| 2231 | #if defined(OS_CHROMEOS) |
| 2232 | if (access == kOwnerAccessToFlags && |
| 2233 | (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2234 | supported = true; |
| 2235 | } |
| 2236 | #endif |
| 2237 | if (supported) |
| 2238 | supported_experiments->Append(data); |
| 2239 | else |
| 2240 | unsupported_experiments->Append(data); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2241 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2242 | } |
| 2243 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2244 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2245 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2246 | } |
| 2247 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2248 | void SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2249 | const std::string& internal_name, |
| 2250 | bool enable) { |
| 2251 | FlagsState::GetInstance()->SetExperimentEnabled(flags_storage, |
| 2252 | internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2253 | } |
| 2254 | |
| 2255 | void RemoveFlagsSwitches( |
| 2256 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2257 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2258 | } |
| 2259 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2260 | void ResetAllFlags(FlagsStorage* flags_storage) { |
| 2261 | FlagsState::GetInstance()->ResetAllFlags(flags_storage); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2262 | } |
| 2263 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2264 | int GetCurrentPlatform() { |
| 2265 | #if defined(OS_MACOSX) |
| 2266 | return kOsMac; |
| 2267 | #elif defined(OS_WIN) |
| 2268 | return kOsWin; |
| 2269 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 2270 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 2271 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2272 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 2273 | #elif defined(OS_ANDROID) |
| 2274 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2275 | #else |
| 2276 | #error Unknown platform |
| 2277 | #endif |
| 2278 | } |
| 2279 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2280 | void RecordUMAStatistics(FlagsStorage* flags_storage) { |
| 2281 | std::set<std::string> flags = flags_storage->GetFlags(); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2282 | for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
| 2283 | ++it) { |
| 2284 | std::string action("AboutFlags_"); |
| 2285 | action += *it; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2286 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2287 | } |
| 2288 | // Since flag metrics are recorded every startup, add a tick so that the |
| 2289 | // stats can be made meaningful. |
| 2290 | if (flags.size()) |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2291 | content::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); |
| 2292 | content::RecordAction(UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2293 | } |
| 2294 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 2295 | base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) { |
| 2296 | return static_cast<base::HistogramBase::Sample>( |
| 2297 | metrics::HashMetricName(switch_name)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2298 | } |
| 2299 | |
| 2300 | void ReportCustomFlags(const std::string& uma_histogram_hame, |
| 2301 | const std::set<std::string>& command_line_difference) { |
| 2302 | for (std::set<std::string>::const_iterator it = |
| 2303 | command_line_difference.begin(); |
| 2304 | it != command_line_difference.end(); |
| 2305 | ++it) { |
| 2306 | int uma_id = about_flags::kBadSwitchFormatHistogramId; |
| 2307 | if (StartsWithASCII(*it, "--", true /* case_sensitive */)) { |
| 2308 | // Skip '--' before switch name. |
| 2309 | std::string switch_name(it->substr(2)); |
| 2310 | |
| 2311 | // Kill value, if any. |
| 2312 | const size_t value_pos = switch_name.find('='); |
| 2313 | if (value_pos != std::string::npos) |
| 2314 | switch_name.resize(value_pos); |
| 2315 | |
| 2316 | uma_id = GetSwitchUMAId(switch_name); |
| 2317 | } else { |
| 2318 | NOTREACHED() << "ReportCustomFlags(): flag '" << *it |
| 2319 | << "' has incorrect format."; |
| 2320 | } |
| 2321 | DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame |
| 2322 | << "' '" << *it << "', uma_id=" << uma_id; |
| 2323 | |
| 2324 | // Sparse histogram macro does not cache the histogram, so it's safe |
| 2325 | // to use macro with non-static histogram name here. |
| 2326 | UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id); |
| 2327 | } |
| 2328 | } |
| 2329 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2330 | ////////////////////////////////////////////////////////////////////////////// |
| 2331 | // FlagsState implementation. |
| 2332 | |
| 2333 | namespace { |
| 2334 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2335 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 2336 | NameToSwitchAndValueMap; |
| 2337 | |
| 2338 | void SetFlagToSwitchMapping(const std::string& key, |
| 2339 | const std::string& switch_name, |
| 2340 | const std::string& switch_value, |
| 2341 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 2342 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 2343 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 2344 | } |
| 2345 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2346 | void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| 2347 | CommandLine* command_line, |
| 2348 | SentinelsMode sentinels) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2349 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2350 | return; |
| 2351 | |
| 2352 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 2353 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2354 | GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, |
| 2355 | &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2356 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2357 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2358 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2359 | const Experiment& e = experiments[i]; |
| 2360 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2361 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 2362 | e.command_line_value, &name_to_switch_map); |
| 2363 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 2364 | for (int j = 0; j < e.num_choices; ++j) { |
| 2365 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 2366 | e.choices[j].command_line_switch, |
| 2367 | e.choices[j].command_line_value, |
| 2368 | &name_to_switch_map); |
| 2369 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2370 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2371 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 2372 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 2373 | &name_to_switch_map); |
| 2374 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 2375 | e.command_line_value, &name_to_switch_map); |
| 2376 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 2377 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2378 | } |
| 2379 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2380 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2381 | if (sentinels == kAddSentinels) { |
| 2382 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
| 2383 | flags_switches_.insert( |
| 2384 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 2385 | std::string())); |
| 2386 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2387 | for (std::set<std::string>::iterator it = enabled_experiments.begin(); |
| 2388 | it != enabled_experiments.end(); |
| 2389 | ++it) { |
| 2390 | const std::string& experiment_name = *it; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2391 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2392 | name_to_switch_map.find(experiment_name); |
| 2393 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 2394 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2395 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2396 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2397 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2398 | const std::pair<std::string, std::string>& |
| 2399 | switch_and_value_pair = name_to_switch_it->second; |
| 2400 | |
[email protected] | 9737b363 | 2013-08-26 09:23:23 | [diff] [blame] | 2401 | CHECK(!switch_and_value_pair.first.empty()); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2402 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 2403 | switch_and_value_pair.second); |
| 2404 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2405 | } |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2406 | if (sentinels == kAddSentinels) { |
| 2407 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
| 2408 | flags_switches_.insert( |
| 2409 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 2410 | std::string())); |
| 2411 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2412 | } |
| 2413 | |
| 2414 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 2415 | return needs_restart_; |
| 2416 | } |
| 2417 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2418 | void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2419 | const std::string& internal_name, |
| 2420 | bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2421 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2422 | if (at_index != std::string::npos) { |
| 2423 | DCHECK(enable); |
| 2424 | // We're being asked to enable a multi-choice experiment. Disable the |
| 2425 | // currently selected choice. |
| 2426 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2427 | const std::string experiment_name = internal_name.substr(0, at_index); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2428 | SetExperimentEnabled(flags_storage, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2429 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2430 | // And enable the new choice, if it is not the default first choice. |
| 2431 | if (internal_name != experiment_name + "@0") { |
| 2432 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2433 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2434 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2435 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2436 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2437 | return; |
| 2438 | } |
| 2439 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2440 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2441 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2442 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2443 | const Experiment* e = NULL; |
| 2444 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2445 | if (experiments[i].internal_name == internal_name) { |
| 2446 | e = experiments + i; |
| 2447 | break; |
| 2448 | } |
| 2449 | } |
| 2450 | DCHECK(e); |
| 2451 | |
| 2452 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2453 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2454 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2455 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2456 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2457 | } else { |
| 2458 | if (enable) { |
| 2459 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2460 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2461 | } else { |
| 2462 | // Find the currently enabled choice and disable it. |
| 2463 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2464 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2465 | if (enabled_experiments.find(choice_name) != |
| 2466 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2467 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2468 | enabled_experiments.erase(choice_name); |
| 2469 | // Continue on just in case there's a bug and more than one |
| 2470 | // experiment for this choice was enabled. |
| 2471 | } |
| 2472 | } |
| 2473 | } |
| 2474 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2475 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2476 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2477 | } |
| 2478 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2479 | void FlagsState::RemoveFlagsSwitches( |
| 2480 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2481 | for (std::map<std::string, std::string>::const_iterator |
| 2482 | it = flags_switches_.begin(); it != flags_switches_.end(); ++it) { |
| 2483 | switch_list->erase(it->first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2484 | } |
| 2485 | } |
| 2486 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2487 | void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) { |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2488 | needs_restart_ = true; |
| 2489 | |
| 2490 | std::set<std::string> no_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2491 | flags_storage->SetFlags(no_experiments); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2492 | } |
| 2493 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2494 | void FlagsState::reset() { |
| 2495 | needs_restart_ = false; |
| 2496 | flags_switches_.clear(); |
| 2497 | } |
| 2498 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 2499 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2500 | |
| 2501 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2502 | |
| 2503 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 2504 | // also need to update the html file. |
| 2505 | const char kMultiSeparator[] = "@"; |
| 2506 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2507 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2508 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2509 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2510 | |
| 2511 | void SetExperiments(const Experiment* e, size_t count) { |
| 2512 | if (!e) { |
| 2513 | experiments = kExperiments; |
| 2514 | num_experiments = arraysize(kExperiments); |
| 2515 | } else { |
| 2516 | experiments = e; |
| 2517 | num_experiments = count; |
| 2518 | } |
| 2519 | } |
| 2520 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2521 | const Experiment* GetExperiments(size_t* count) { |
| 2522 | *count = num_experiments; |
| 2523 | return experiments; |
| 2524 | } |
| 2525 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2526 | } // namespace testing |
| 2527 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2528 | } // namespace about_flags |