[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" |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 15 | #include "base/stl_util.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 16 | #include "base/strings/string_number_conversions.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 17 | #include "base/strings/string_util.h" |
[email protected] | 135cb80 | 2013-06-09 16:44:20 | [diff] [blame] | 18 | #include "base/strings/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 19 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 20 | #include "cc/base/switches.h" |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 21 | #include "chrome/browser/flags_storage.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 22 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 23 | #include "chrome/common/chrome_switches.h" |
gburanov | fc88a24c | 2015-04-14 00:00:57 | [diff] [blame] | 24 | #include "chrome/grit/chromium_strings.h" |
[email protected] | af39f00 | 2014-08-22 10:18:18 | [diff] [blame] | 25 | #include "chrome/grit/generated_resources.h" |
gburanov | fc88a24c | 2015-04-14 00:00:57 | [diff] [blame] | 26 | #include "chrome/grit/google_chrome_strings.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" |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 29 | #include "components/dom_distiller/core/dom_distiller_switches.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 30 | #include "components/metrics/metrics_hashes.h" |
[email protected] | cbb22eb | 2013-06-24 23:53:10 | [diff] [blame] | 31 | #include "components/nacl/common/nacl_switches.h" |
dschuyler | 26d36874 | 2015-02-12 00:18:24 | [diff] [blame] | 32 | #include "components/omnibox/omnibox_switches.h" |
dbeam | 155ac97 | 2015-04-20 15:34:48 | [diff] [blame] | 33 | #include "components/plugins/common/plugins_switches.h" |
isherman | 96bfc8d2 | 2014-11-06 00:42:46 | [diff] [blame] | 34 | #include "components/proximity_auth/switches.h" |
[email protected] | 720b1049 | 2014-07-23 08:48:40 | [diff] [blame] | 35 | #include "components/search/search_switches.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 36 | #include "content/public/browser/user_metrics.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 37 | #include "media/base/media_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 38 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 39 | #include "ui/base/ui_base_switches.h" |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 40 | #include "ui/display/display_switches.h" |
[email protected] | a6147a2 | 2013-09-26 06:55:09 | [diff] [blame] | 41 | #include "ui/events/event_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 42 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 43 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 44 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | e3d512a7 | 2014-03-18 20:50:47 | [diff] [blame] | 45 | #include "ui/native_theme/native_theme_switches.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 46 | #include "ui/views/views_switches.h" |
[email protected] | 9a22457 | 2013-05-12 23:08:56 | [diff] [blame] | 47 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 48 | #if defined(OS_ANDROID) |
| 49 | #include "chrome/common/chrome_version_info.h" |
megjablon | 3476e04 | 2014-10-14 19:21:59 | [diff] [blame] | 50 | #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 51 | #else |
| 52 | #include "ui/message_center/message_center_switches.h" |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 53 | #endif |
| 54 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 55 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 56 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 57 | #endif |
| 58 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 59 | #if defined(OS_CHROMEOS) |
| 60 | #include "chromeos/chromeos_switches.h" |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 61 | #include "third_party/cros_system_api/switches/chrome_switches.h" |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 62 | #endif |
| 63 | |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 64 | #if defined(ENABLE_APP_LIST) |
| 65 | #include "ui/app_list/app_list_switches.h" |
| 66 | #endif |
| 67 | |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 68 | #if defined(ENABLE_EXTENSIONS) |
| 69 | #include "extensions/common/switches.h" |
| 70 | #endif |
| 71 | |
alexst | 24a14a32 | 2015-03-10 21:06:09 | [diff] [blame] | 72 | #if defined(USE_OZONE) |
| 73 | #include "ui/ozone/public/ozone_switches.h" |
| 74 | #endif |
| 75 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 76 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 77 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 78 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 79 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 80 | Experiment::SINGLE_VALUE, \ |
| 81 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 82 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 83 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 84 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 85 | disable_switch, disable_value) \ |
| 86 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 87 | disable_switch, disable_value, NULL, 3 |
| 88 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 89 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 90 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 91 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 92 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 93 | namespace { |
| 94 | |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 95 | // Enumeration of OSs. |
| 96 | enum { |
| 97 | kOsMac = 1 << 0, |
| 98 | kOsWin = 1 << 1, |
| 99 | kOsLinux = 1 << 2, |
| 100 | kOsCrOS = 1 << 3, |
| 101 | kOsAndroid = 1 << 4, |
| 102 | kOsCrOSOwnerOnly = 1 << 5 |
| 103 | }; |
| 104 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 105 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 106 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 107 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 108 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 109 | // whether the experiment is available on that platform. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 110 | void AddOsStrings(unsigned bitmask, base::ListValue* list) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 111 | struct { |
| 112 | unsigned bit; |
| 113 | const char* const name; |
| 114 | } kBitsToOs[] = { |
| 115 | {kOsMac, "Mac"}, |
| 116 | {kOsWin, "Windows"}, |
| 117 | {kOsLinux, "Linux"}, |
| 118 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 119 | {kOsAndroid, "Android"}, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 120 | {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 121 | }; |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 122 | for (size_t i = 0; i < arraysize(kBitsToOs); ++i) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 123 | if (bitmask & kBitsToOs[i].bit) |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 124 | list->Append(new base::StringValue(kBitsToOs[i].name)); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 125 | } |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 126 | } |
| 127 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 128 | // Convert switch constants to proper CommandLine::StringType strings. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 129 | base::CommandLine::StringType GetSwitchString(const std::string& flag) { |
| 130 | base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 131 | cmd_line.AppendSwitch(flag); |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 132 | DCHECK_EQ(2U, cmd_line.argv().size()); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 133 | return cmd_line.argv()[1]; |
| 134 | } |
| 135 | |
| 136 | // Scoops flags from a command line. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 137 | std::set<base::CommandLine::StringType> ExtractFlagsFromCommandLine( |
| 138 | const base::CommandLine& cmdline) { |
| 139 | std::set<base::CommandLine::StringType> flags; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 140 | // First do the ones between --flag-switches-begin and --flag-switches-end. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 141 | base::CommandLine::StringVector::const_iterator first = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 142 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 143 | GetSwitchString(switches::kFlagSwitchesBegin)); |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 144 | base::CommandLine::StringVector::const_iterator last = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 145 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 146 | GetSwitchString(switches::kFlagSwitchesEnd)); |
| 147 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 148 | flags.insert(first + 1, last); |
| 149 | #if defined(OS_CHROMEOS) |
| 150 | // Then add those between --policy-switches-begin and --policy-switches-end. |
| 151 | first = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 152 | GetSwitchString(chromeos::switches::kPolicySwitchesBegin)); |
| 153 | last = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 154 | GetSwitchString(chromeos::switches::kPolicySwitchesEnd)); |
| 155 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 156 | flags.insert(first + 1, last); |
| 157 | #endif |
| 158 | return flags; |
| 159 | } |
| 160 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 161 | const Experiment::Choice kTouchEventsChoices[] = { |
| 162 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 163 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 164 | switches::kTouchEvents, |
| 165 | switches::kTouchEventsEnabled }, |
| 166 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 167 | switches::kTouchEvents, |
| 168 | switches::kTouchEventsDisabled } |
| 169 | }; |
| 170 | |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 171 | #if defined(USE_AURA) |
| 172 | const Experiment::Choice kOverscrollHistoryNavigationChoices[] = { |
| 173 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, |
| 174 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 175 | switches::kOverscrollHistoryNavigation, |
| 176 | "0" }, |
| 177 | { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, |
| 178 | switches::kOverscrollHistoryNavigation, |
| 179 | "2" } |
| 180 | }; |
| 181 | #endif |
| 182 | |
mfomitchev | 5ad034ec | 2015-04-24 21:57:27 | [diff] [blame] | 183 | const Experiment::Choice kTouchTextSelectionStrategyChoices[] = { |
| 184 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 185 | { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER, |
| 186 | switches::kTouchTextSelectionStrategy, |
| 187 | "character" }, |
| 188 | { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION, |
| 189 | switches::kTouchTextSelectionStrategy, |
| 190 | "direction" } |
| 191 | }; |
| 192 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 193 | #if !defined(DISABLE_NACL) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 194 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 195 | // 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] | 196 | // debug stub to a remote machine. Since secure shell uses NaCl, we usually |
| 197 | // want to avoid debugging that. The PNaCl translator is also a NaCl module, |
| 198 | // so by default we want to avoid debugging that. |
| 199 | // NOTE: As the default value must be the empty string, the mask excluding |
| 200 | // the PNaCl translator and secure shell is substituted elsewhere. |
| 201 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 202 | { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 203 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 204 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 205 | }; |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 206 | #endif |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 207 | |
palmer | 601fe3c | 2015-01-23 20:43:02 | [diff] [blame] | 208 | const Experiment::Choice kMarkNonSecureAsChoices[] = { |
| 209 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 210 | { IDS_MARK_NON_SECURE_AS_NEUTRAL, |
| 211 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsNeutral}, |
| 212 | { IDS_MARK_NON_SECURE_AS_NON_SECURE, |
| 213 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsNonSecure}, |
| 214 | { IDS_MARK_NON_SECURE_AS_DUBIOUS, |
| 215 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsDubious} |
| 216 | }; |
| 217 | |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 218 | const Experiment::Choice kMaxTilesForInterestAreaChoices[] = { |
| 219 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 220 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 221 | cc::switches::kMaxTilesForInterestArea, "64"}, |
| 222 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 223 | cc::switches::kMaxTilesForInterestArea, "128"}, |
| 224 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 225 | cc::switches::kMaxTilesForInterestArea, "256"}, |
| 226 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 227 | cc::switches::kMaxTilesForInterestArea, "512"} |
| 228 | }; |
| 229 | |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 230 | const Experiment::Choice kShowSavedCopyChoices[] = { |
| 231 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 232 | { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY, |
| 233 | switches::kShowSavedCopy, switches::kEnableShowSavedCopyPrimary }, |
| 234 | { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY, |
| 235 | switches::kShowSavedCopy, switches::kEnableShowSavedCopySecondary }, |
| 236 | { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY, |
| 237 | switches::kShowSavedCopy, switches::kDisableShowSavedCopy } |
| 238 | }; |
| 239 | |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 240 | const Experiment::Choice kDefaultTileWidthChoices[] = { |
| 241 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 242 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT, |
| 243 | switches::kDefaultTileWidth, "128"}, |
| 244 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL, |
| 245 | switches::kDefaultTileWidth, "256"}, |
| 246 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE, |
| 247 | switches::kDefaultTileWidth, "512"}, |
| 248 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI, |
| 249 | switches::kDefaultTileWidth, "1024"} |
| 250 | }; |
| 251 | |
| 252 | const Experiment::Choice kDefaultTileHeightChoices[] = { |
| 253 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 254 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT, |
| 255 | switches::kDefaultTileHeight, "128"}, |
| 256 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL, |
| 257 | switches::kDefaultTileHeight, "256"}, |
| 258 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE, |
| 259 | switches::kDefaultTileHeight, "512"}, |
| 260 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI, |
| 261 | switches::kDefaultTileHeight, "1024"} |
| 262 | }; |
| 263 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 264 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
[email protected] | 9a3de3e3 | 2013-04-23 19:05:21 | [diff] [blame] | 265 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 266 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 267 | switches::kUseSimpleCacheBackend, "off" }, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 268 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 269 | switches::kUseSimpleCacheBackend, "on"} |
| 270 | }; |
| 271 | |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 272 | #if defined(USE_AURA) |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 273 | const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 274 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 275 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 276 | switches::kTabCaptureUpscaleQuality, "fast" }, |
| 277 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 278 | switches::kTabCaptureUpscaleQuality, "good" }, |
| 279 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 280 | switches::kTabCaptureUpscaleQuality, "best" }, |
| 281 | }; |
| 282 | |
| 283 | const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 284 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 285 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 286 | switches::kTabCaptureDownscaleQuality, "fast" }, |
| 287 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 288 | switches::kTabCaptureDownscaleQuality, "good" }, |
| 289 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 290 | switches::kTabCaptureDownscaleQuality, "best" }, |
| 291 | }; |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 292 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 293 | |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 294 | #if defined(OS_ANDROID) |
| 295 | const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 296 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 297 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 298 | switches::kEnableZeroSuggestMostVisited, ""}, |
mariakhomenko | ad3bfef | 2014-10-27 22:57:33 | [diff] [blame] | 299 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP, |
| 300 | switches::kEnableZeroSuggestMostVisitedWithoutSerp, ""}, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 301 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 302 | switches::kDisableZeroSuggest, ""} |
| 303 | }; |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 304 | |
| 305 | const Experiment::Choice kReaderModeHeuristicsChoices[] = { |
| 306 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 307 | { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP, |
| 308 | switches::kReaderModeHeuristics, |
| 309 | switches::reader_mode_heuristics::kOGArticle }, |
| 310 | { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST, |
| 311 | switches::kReaderModeHeuristics, |
| 312 | switches::reader_mode_heuristics::kAdaBoost }, |
| 313 | { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON, |
| 314 | switches::kReaderModeHeuristics, |
| 315 | switches::reader_mode_heuristics::kAlwaysTrue }, |
| 316 | { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF, |
| 317 | switches::kReaderModeHeuristics, |
| 318 | switches::reader_mode_heuristics::kNone }, |
| 319 | }; |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 320 | #endif |
| 321 | |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 322 | const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 323 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | 00d92d3 | 2014-01-23 09:46:50 | [diff] [blame] | 324 | { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 325 | { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 326 | { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 327 | { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 328 | }; |
| 329 | |
Stephen White | d0bdd942 | 2015-04-03 00:29:35 | [diff] [blame] | 330 | const Experiment::Choice kGpuRasterizationMSAASampleCountChoices[] = { |
| 331 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 332 | "", |
| 333 | "" }, |
| 334 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO, |
| 335 | switches::kGpuRasterizationMSAASampleCount, "0" }, |
| 336 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO, |
| 337 | switches::kGpuRasterizationMSAASampleCount, "2" }, |
| 338 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR, |
| 339 | switches::kGpuRasterizationMSAASampleCount, "4" }, |
| 340 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT, |
| 341 | switches::kGpuRasterizationMSAASampleCount, "8" }, |
| 342 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN, |
| 343 | switches::kGpuRasterizationMSAASampleCount, "16" }, |
| 344 | }; |
| 345 | |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 346 | const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 347 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 348 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 349 | switches::kEnableGpuRasterization, "" }, |
| 350 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 351 | switches::kDisableGpuRasterization, "" }, |
| 352 | { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 353 | switches::kForceGpuRasterization, "" }, |
| 354 | }; |
| 355 | |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 356 | #if defined(OS_CHROMEOS) |
| 357 | const Experiment::Choice kMemoryPressureThresholdChoices[] = { |
xdai | f735c7a | 2015-02-12 02:08:34 | [diff] [blame] | 358 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 359 | { IDS_FLAGS_CONSERVATIVE_THRESHOLDS, |
| 360 | chromeos::switches::kMemoryPressureThresholds, |
| 361 | chromeos::switches::kConservativeThreshold }, |
| 362 | { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS, |
| 363 | chromeos::switches::kMemoryPressureThresholds, |
| 364 | chromeos::switches::kAggressiveCacheDiscardThreshold }, |
| 365 | { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS, |
| 366 | chromeos::switches::kMemoryPressureThresholds, |
| 367 | chromeos::switches::kAggressiveTabDiscardThreshold }, |
| 368 | { IDS_FLAGS_AGGRESSIVE_THRESHOLDS, |
| 369 | chromeos::switches::kMemoryPressureThresholds, |
| 370 | chromeos::switches::kAggressiveThreshold }, |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 371 | }; |
| 372 | #endif |
| 373 | |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 374 | const Experiment::Choice kExtensionContentVerificationChoices[] = { |
| 375 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 376 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 377 | switches::kExtensionContentVerification, |
| 378 | switches::kExtensionContentVerificationBootstrap }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 379 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 380 | switches::kExtensionContentVerification, |
| 381 | switches::kExtensionContentVerificationEnforce }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 382 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 383 | switches::kExtensionContentVerification, |
| 384 | switches::kExtensionContentVerificationEnforceStrict }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 385 | }; |
| 386 | |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 387 | // Note that the value is specified in seconds (where 0 is equivalent to |
| 388 | // disabled). |
| 389 | const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = { |
| 390 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 391 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 392 | switches::kRememberCertErrorDecisions, |
| 393 | "-1" }, |
| 394 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY, |
| 395 | switches::kRememberCertErrorDecisions, |
| 396 | "86400" }, |
| 397 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS, |
| 398 | switches::kRememberCertErrorDecisions, |
| 399 | "259200" }, |
| 400 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK, |
| 401 | switches::kRememberCertErrorDecisions, |
| 402 | "604800" }, |
| 403 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 404 | switches::kRememberCertErrorDecisions, |
| 405 | "2592000" }, |
| 406 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS, |
| 407 | switches::kRememberCertErrorDecisions, |
| 408 | "7776000" }, |
| 409 | }; |
| 410 | |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 411 | const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 412 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 413 | { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 414 | password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 415 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 416 | password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 417 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 418 | password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 419 | }; |
| 420 | |
agl | 0a4a1634 | 2014-11-05 04:17:05 | [diff] [blame] | 421 | const Experiment::Choice kSSLVersionMinChoices[] = { |
| 422 | { IDS_FLAGS_SSL_VERSION_DEFAULT, "", "" }, |
| 423 | { IDS_FLAGS_SSL_VERSION_SSLV3, switches::kSSLVersionMin, |
| 424 | switches::kSSLVersionSSLv3 }, |
| 425 | { IDS_FLAGS_SSL_VERSION_TLSV1, switches::kSSLVersionMin, |
| 426 | switches::kSSLVersionTLSv1 }, |
| 427 | { IDS_FLAGS_SSL_VERSION_TLSV11, switches::kSSLVersionMin, |
| 428 | switches::kSSLVersionTLSv11 }, |
| 429 | { IDS_FLAGS_SSL_VERSION_TLSV12, switches::kSSLVersionMin, |
| 430 | switches::kSSLVersionTLSv12 }, |
| 431 | }; |
| 432 | |
jww | c3ab6e7b | 2014-12-23 18:16:18 | [diff] [blame] | 433 | const Experiment::Choice kFillOnAccountSelectChoices[] = { |
| 434 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 435 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 436 | autofill::switches::kDisableFillOnAccountSelect, "" }, |
| 437 | { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING, |
| 438 | autofill::switches::kEnableFillOnAccountSelect, "" }, |
| 439 | { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING, |
| 440 | autofill::switches::kEnableFillOnAccountSelectNoHighlighting, "" }, |
| 441 | }; |
| 442 | |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 443 | #if defined(USE_ASH) |
| 444 | const Experiment::Choice kAshScreenRotationAnimationChoices[] = { |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 445 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 446 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 447 | ash::switches::kAshEnableScreenRotationAnimation, |
| 448 | "none" }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 449 | { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION, |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 450 | ash::switches::kAshEnableScreenRotationAnimation, |
| 451 | "partial-rotation" }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 452 | { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION, |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 453 | ash::switches::kAshEnableScreenRotationAnimation, |
| 454 | "full-rotation" } |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 455 | }; |
| 456 | #endif |
| 457 | |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 458 | #if defined(OS_CHROMEOS) |
| 459 | const Experiment::Choice kDataSaverPromptChoices[] = { |
| 460 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 461 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 462 | chromeos::switches::kDisableDataSaverPrompt, "" }, |
| 463 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 464 | chromeos::switches::kEnableDataSaverPrompt, "" }, |
| 465 | { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE, |
| 466 | chromeos::switches::kEnableDataSaverPrompt, |
| 467 | chromeos::switches::kDataSaverPromptDemoMode }, |
| 468 | }; |
bshe | b67430e | 2015-04-30 14:02:11 | [diff] [blame] | 469 | |
| 470 | const Experiment::Choice kFloatingVirtualKeyboardChoices[] = { |
| 471 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 472 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 473 | keyboard::switches::kFloatingVirtualKeyboard, |
| 474 | keyboard::switches::kFloatingVirtualKeyboardDisabled}, |
| 475 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 476 | keyboard::switches::kFloatingVirtualKeyboard, |
| 477 | keyboard::switches::kFloatingVirtualKeyboardEnabled}, |
| 478 | }; |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 479 | #endif |
| 480 | |
treib | e2082a0e | 2015-04-08 10:15:30 | [diff] [blame] | 481 | const Experiment::Choice kSupervisedUserSafeSitesChoices[] = { |
| 482 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 483 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 484 | switches::kSupervisedUserSafeSites, |
| 485 | "enabled" }, |
| 486 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 487 | switches::kSupervisedUserSafeSites, |
| 488 | "disabled" }, |
| 489 | { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY, |
| 490 | switches::kSupervisedUserSafeSites, |
| 491 | "blacklist-only" }, |
| 492 | { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY, |
| 493 | switches::kSupervisedUserSafeSites, |
| 494 | "online-check-only" } |
| 495 | }; |
| 496 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 497 | // RECORDING USER METRICS FOR FLAGS: |
| 498 | // ----------------------------------------------------------------------------- |
| 499 | // The first line of the experiment is the internal name. If you'd like to |
| 500 | // gather statistics about the usage of your flag, you should append a marker |
| 501 | // comment to the end of the feature name, like so: |
| 502 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 503 | // |
[email protected] | d8320fb6 | 2014-03-22 03:16:37 | [diff] [blame] | 504 | // After doing that, run |
| 505 | // tools/metrics/actions/extract_actions.py |
| 506 | // to add the metric to actions.xml (which will enable UMA to record your |
| 507 | // feature flag), then update the <owner>s and <description> sections. Make sure |
| 508 | // to include the actions.xml file when you upload your code for review! |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 509 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 510 | // After your feature has shipped under a flag, you can locate the metrics under |
| 511 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 512 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 513 | // get a sense of usage. Note that this will not be the same as number of users |
| 514 | // with a given feature enabled because users can quit and relaunch the |
| 515 | // application multiple times over a given time interval. The dashboard also |
| 516 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 517 | // last seven days. However, note that this is not the same as the number of |
| 518 | // users who have the flag enabled, since enabling the flag happens once, |
| 519 | // whereas running with the flag enabled happens until the user flips the flag |
| 520 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 521 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 522 | // To add a new experiment add to the end of kExperiments. There are two |
| 523 | // distinct types of experiments: |
| 524 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 525 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 526 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 527 | // deactivated state for this lab (i.e. no command line option). To specify |
| 528 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 529 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 530 | // See the documentation of Experiment for details on the fields. |
| 531 | // |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 532 | // Command-line switches must have entries in enum "LoginCustomFlags" in |
| 533 | // histograms.xml. See note in histograms.xml and don't forget to run |
| 534 | // AboutFlagsHistogramTest unit test to calculate and verify checksum. |
| 535 | // |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 536 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 537 | const Experiment kExperiments[] = { |
| 538 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 539 | "ignore-gpu-blacklist", |
| 540 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 541 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 542 | kOsAll, |
| 543 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 544 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 545 | #if defined(OS_WIN) |
| 546 | { |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 547 | "disable-direct-write", |
| 548 | IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME, |
| 549 | IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 550 | kOsWin, |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 551 | SINGLE_VALUE_TYPE(switches::kDisableDirectWrite) |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 552 | }, |
wfh | d672334 | 2014-12-11 19:50:48 | [diff] [blame] | 553 | { |
| 554 | "enable-win32k-renderer-lockdown", |
| 555 | IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME, |
| 556 | IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION, |
| 557 | kOsWin, |
| 558 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableWin32kRendererLockDown, |
| 559 | switches::kDisableWin32kRendererLockDown) |
| 560 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 561 | #endif |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 562 | { |
[email protected] | 2b60875 | 2013-05-01 03:34:36 | [diff] [blame] | 563 | "enable-experimental-canvas-features", |
| 564 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME, |
| 565 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION, |
| 566 | kOsAll, |
| 567 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures) |
| 568 | }, |
| 569 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 570 | "disable-accelerated-2d-canvas", |
| 571 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 572 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 573 | kOsAll, |
| 574 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 575 | }, |
| 576 | { |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 577 | "enable-display-list-2d-canvas", |
| 578 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME, |
| 579 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION, |
| 580 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 581 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas, |
| 582 | switches::kDisableDisplayList2dCanvas) |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 583 | }, |
| 584 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 585 | "composited-layer-borders", |
| 586 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 587 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 588 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 589 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 590 | }, |
| 591 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 592 | "show-fps-counter", |
| 593 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 594 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 595 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 596 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 597 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 598 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 599 | "disable-webgl", |
| 600 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 601 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | 6c7784e | 2013-08-01 22:41:28 | [diff] [blame] | 602 | kOsAll, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 603 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 604 | }, |
wfh | 0539f2f5 | 2015-01-21 14:36:46 | [diff] [blame] | 605 | #if defined(OS_WIN) || defined(OS_MACOSX) |
| 606 | { |
| 607 | "enable-npapi", |
| 608 | IDS_FLAGS_ENABLE_NPAPI_NAME, |
| 609 | IDS_FLAGS_ENABLE_NPAPI_DESCRIPTION, |
| 610 | kOsWin | kOsMac, |
| 611 | SINGLE_VALUE_TYPE(switches::kEnableNpapi) |
| 612 | }, |
| 613 | #endif |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 614 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 615 | "disable-webrtc", |
| 616 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 617 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 618 | kOsAndroid, |
| 619 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 620 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 621 | #else |
| 622 | SINGLE_VALUE_TYPE("") |
| 623 | #endif |
| 624 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 625 | #if defined(ENABLE_WEBRTC) |
[email protected] | d816ddc | 2013-05-23 14:28:30 | [diff] [blame] | 626 | { |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 627 | "disable-webrtc-hw-decoding", |
| 628 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME, |
| 629 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION, |
[email protected] | 6442b02 | 2013-12-05 11:09:05 | [diff] [blame] | 630 | kOsAndroid | kOsCrOS, |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 631 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding) |
| 632 | }, |
| 633 | { |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 634 | "disable-webrtc-hw-encoding", |
| 635 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME, |
| 636 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION, |
[email protected] | 6998f01f2 | 2013-12-04 09:27:57 | [diff] [blame] | 637 | kOsAndroid | kOsCrOS, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 638 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding) |
| 639 | }, |
pthatcher | b3b993a | 2015-03-13 01:04:04 | [diff] [blame] | 640 | { |
| 641 | "enable-webrtc-stun-origin", |
| 642 | IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME, |
| 643 | IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION, |
| 644 | kOsAll, |
| 645 | SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin) |
| 646 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 647 | #endif |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 648 | #if defined(OS_ANDROID) |
| 649 | { |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 650 | "disable-webaudio", |
| 651 | IDS_FLAGS_DISABLE_WEBAUDIO_NAME, |
| 652 | IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION, |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 653 | kOsAndroid, |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 654 | SINGLE_VALUE_TYPE(switches::kDisableWebAudio) |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 655 | }, |
| 656 | #endif |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 657 | // Native client is compiled out when DISABLE_NACL is defined. |
| 658 | #if !defined(DISABLE_NACL) |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 659 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 660 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 661 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 662 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 663 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 664 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 665 | }, |
| 666 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 667 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 668 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 669 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 670 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 671 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 672 | }, |
| 673 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 674 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 675 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 676 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 677 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 678 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 679 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 680 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 681 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 682 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 683 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 684 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 685 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 686 | kOsDesktop, |
[email protected] | c8d0299 | 2013-07-31 22:16:51 | [diff] [blame] | 687 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 688 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 689 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 690 | "extensions-on-chrome-urls", |
| 691 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 692 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 693 | kOsAll, |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 694 | SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 695 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 696 | #endif |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 697 | { |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 698 | "enable-fast-unload", |
| 699 | IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, |
| 700 | IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION, |
| 701 | kOsAll, |
| 702 | SINGLE_VALUE_TYPE(switches::kEnableFastUnload) |
| 703 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 704 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 705 | { |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 706 | "enable-app-window-controls", |
| 707 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, |
| 708 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION, |
| 709 | kOsDesktop, |
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 710 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls) |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 711 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 712 | #endif |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 713 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 714 | "disable-hyperlink-auditing", |
| 715 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 716 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 717 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 718 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 719 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 720 | #if defined(OS_ANDROID) |
| 721 | { |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 722 | "contextual-search", |
| 723 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH, |
| 724 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION, |
| 725 | kOsAndroid, |
[email protected] | 41d32bb | 2014-05-30 08:26:05 | [diff] [blame] | 726 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, |
| 727 | switches::kDisableContextualSearch) |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 728 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 729 | #endif |
[email protected] | 8cc9e53 | 2013-05-06 21:01:47 | [diff] [blame] | 730 | { |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 731 | "show-autofill-type-predictions", |
| 732 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 733 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 734 | kOsAll, |
[email protected] | e217c563 | 2013-04-12 19:11:48 | [diff] [blame] | 735 | SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions) |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 736 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 737 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 738 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 739 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 740 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 741 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 742 | // On by default for the Mac (different implementation in WebKit). |
[email protected] | a5a5aaf | 2013-12-19 02:10:10 | [diff] [blame] | 743 | kOsLinux, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 744 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 745 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 746 | #if defined(USE_AURA) || defined(OS_LINUX) |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 747 | { |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 748 | "overlay-scrollbars", |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 749 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME, |
| 750 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION, |
| 751 | // Uses the system preference on Mac (a different implementation). |
| 752 | // On Android, this is always enabled. |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 753 | kOsLinux | kOsCrOS | kOsWin, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 754 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar, |
| 755 | switches::kDisableOverlayScrollbar) |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 756 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 757 | #endif |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 758 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 759 | "enable-panels", |
| 760 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 761 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 762 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 763 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 764 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 765 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 766 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 767 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 768 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 769 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 770 | kOsMac | kOsWin | kOsLinux, |
| 771 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 772 | }, |
| 773 | { |
[email protected] | 903e6338 | 2013-06-01 00:40:58 | [diff] [blame] | 774 | "enable-quic", |
| 775 | IDS_FLAGS_ENABLE_QUIC_NAME, |
| 776 | IDS_FLAGS_ENABLE_QUIC_DESCRIPTION, |
| 777 | kOsAll, |
| 778 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, |
| 779 | switches::kDisableQuic) |
| 780 | }, |
| 781 | { |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 782 | "enable-spdy4", |
| 783 | IDS_FLAGS_ENABLE_SPDY4_NAME, |
| 784 | IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION, |
[email protected] | bca09b998 | 2013-06-27 22:30:46 | [diff] [blame] | 785 | kOsAll, |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 786 | SINGLE_VALUE_TYPE(switches::kEnableSpdy4) |
[email protected] | 88a33262 | 2013-07-30 07:13:32 | [diff] [blame] | 787 | }, |
| 788 | { |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 789 | "disable-media-source", |
| 790 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 791 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 792 | kOsAll, |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 793 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 722b4d484f | 2013-10-08 20:33:59 | [diff] [blame] | 794 | }, |
| 795 | { |
ddorwin | 73bdb0b | 2015-01-26 23:03:09 | [diff] [blame] | 796 | "disable-encrypted-media", |
| 797 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME, |
| 798 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 799 | kOsAll, |
ddorwin | 73bdb0b | 2015-01-26 23:03:09 | [diff] [blame] | 800 | SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia) |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 801 | }, |
| 802 | { |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 803 | "disable-prefixed-encrypted-media", |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 804 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME, |
| 805 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 806 | kOsAll, |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 807 | SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 808 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 809 | #if defined(OS_ANDROID) |
| 810 | { |
[email protected] | 3c56ec1 | 2013-09-25 02:03:42 | [diff] [blame] | 811 | "disable-infobar-for-protected-media-identifier", |
| 812 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME, |
| 813 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION, |
| 814 | kOsAndroid, |
| 815 | SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier) |
| 816 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 817 | #endif // defined(OS_ANDROID) |
[email protected] | d21ead4 | 2013-06-24 06:35:06 | [diff] [blame] | 818 | { |
dslomov | a893e97 | 2014-12-05 09:39:57 | [diff] [blame] | 819 | "disable-javascript-harmony-shipping", |
| 820 | IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME, |
| 821 | IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION, |
| 822 | kOsAll, |
| 823 | SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping) |
| 824 | }, |
| 825 | { |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 826 | "enable-javascript-harmony", |
| 827 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 828 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 829 | kOsAll, |
erikcorry | b251cb9 | 2014-09-25 23:48:51 | [diff] [blame] | 830 | SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony) |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 831 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 832 | { |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 833 | "disable-software-rasterizer", |
| 834 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 835 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 836 | #if defined(ENABLE_SWIFTSHADER) |
| 837 | kOsAll, |
| 838 | #else |
| 839 | 0, |
| 840 | #endif |
| 841 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 842 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 843 | { |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 844 | "enable-gpu-rasterization", |
| 845 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 846 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
hendrikw | e62dda56 | 2014-12-17 19:28:15 | [diff] [blame] | 847 | kOsAll, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 848 | MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 849 | }, |
| 850 | { |
Stephen White | d0bdd942 | 2015-04-03 00:29:35 | [diff] [blame] | 851 | "gpu-rasterization-msaa-sample-count", |
| 852 | IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME, |
| 853 | IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION, |
| 854 | kOsAll, |
| 855 | MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices) |
| 856 | }, |
| 857 | { |
pdr | cd73ed36 | 2015-03-31 22:51:58 | [diff] [blame] | 858 | "enable-slimming-paint", |
| 859 | IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME, |
| 860 | IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION, |
| 861 | kOsAll, |
| 862 | SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint) |
| 863 | }, |
| 864 | { |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 865 | "enable-experimental-web-platform-features", |
| 866 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 867 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 868 | kOsAll, |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 869 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 870 | }, |
| 871 | { |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 872 | "disable-ntp-other-sessions-menu", |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 873 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME, |
| 874 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 875 | kOsDesktop, |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 876 | SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu) |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 877 | }, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 878 | { |
| 879 | "enable-devtools-experiments", |
| 880 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 881 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 882 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 883 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 884 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 885 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 886 | "silent-debugger-extension-api", |
| 887 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 888 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 889 | kOsDesktop, |
| 890 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 891 | }, |
oshima | 66a9f96 | 2014-11-07 20:01:16 | [diff] [blame] | 892 | #if defined(ENABLE_SPELLCHECK) |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 893 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 894 | "spellcheck-autocorrect", |
| 895 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 896 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 897 | kOsWin | kOsLinux | kOsCrOS, |
| 898 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 899 | }, |
oshima | 66a9f96 | 2014-11-07 20:01:16 | [diff] [blame] | 900 | #endif |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 901 | { |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 902 | "enable-scroll-prediction", |
| 903 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME, |
| 904 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION, |
| 905 | kOsDesktop, |
| 906 | SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction) |
| 907 | }, |
| 908 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 909 | "touch-events", |
| 910 | IDS_TOUCH_EVENTS_NAME, |
| 911 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 912 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 913 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 914 | }, |
| 915 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 916 | "disable-touch-adjustment", |
| 917 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 918 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
zeeshanq | cf855b0 | 2014-09-25 18:09:49 | [diff] [blame] | 919 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 920 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 921 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 922 | #if defined(OS_CHROMEOS) |
| 923 | { |
[email protected] | 81f89e9 | 2014-02-21 14:27:35 | [diff] [blame] | 924 | "network-portal-notification", |
| 925 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME, |
| 926 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION, |
| 927 | kOsCrOS, |
| 928 | ENABLE_DISABLE_VALUE_TYPE( |
| 929 | chromeos::switches::kEnableNetworkPortalNotification, |
| 930 | chromeos::switches::kDisableNetworkPortalNotification) |
| 931 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 932 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 933 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 934 | "enable-download-resumption", |
| 935 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 936 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 937 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 938 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 939 | }, |
yoshiki | f42d8fc | 2015-03-04 20:07:50 | [diff] [blame] | 940 | { |
| 941 | "enable-download-notification", |
| 942 | IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME, |
| 943 | IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION, |
| 944 | kOsCrOS, |
| 945 | SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification) |
| 946 | }, |
[email protected] | 67fe364 | 2014-08-05 00:00:42 | [diff] [blame] | 947 | #if defined(ENABLE_PLUGINS) |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 948 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 949 | "allow-nacl-socket-api", |
| 950 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 951 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 952 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 953 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 954 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 955 | #endif |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 956 | #if defined(OS_CHROMEOS) |
| 957 | { |
| 958 | "allow-touchpad-three-finger-click", |
| 959 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 960 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 961 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 962 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick) |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 963 | }, |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 964 | { |
oshima | 94c2467 | 2015-05-01 16:06:14 | [diff] [blame] | 965 | "ash-enable-unified-desktop", |
| 966 | IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME, |
| 967 | IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION, |
| 968 | kOsCrOS, |
| 969 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop) |
| 970 | }, |
| 971 | { |
xiyuan | 47a05d0 | 2014-12-09 18:57:24 | [diff] [blame] | 972 | "disable-easy-unlock", |
| 973 | IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME, |
| 974 | IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION, |
isherman | e72a697a | 2014-11-26 05:08:21 | [diff] [blame] | 975 | kOsCrOS, |
xiyuan | 47a05d0 | 2014-12-09 18:57:24 | [diff] [blame] | 976 | SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock) |
isherman | e72a697a | 2014-11-26 05:08:21 | [diff] [blame] | 977 | }, |
| 978 | { |
isherman | 96bfc8d2 | 2014-11-06 00:42:46 | [diff] [blame] | 979 | "enable-easy-unlock-proximity-detection", |
| 980 | IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME, |
| 981 | IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION, |
| 982 | kOsCrOS, |
| 983 | SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection) |
| 984 | }, |
msarda | 4c408ff | 2015-04-22 14:27:56 | [diff] [blame] | 985 | { |
| 986 | "enable-easy-unlock-bluetooth-low-energy-detection", |
| 987 | IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME, |
| 988 | IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION, |
| 989 | kOsCrOS, |
| 990 | SINGLE_VALUE_TYPE( |
| 991 | proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery) |
| 992 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 993 | #endif |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 994 | #if defined(USE_ASH) |
| 995 | { |
[email protected] | 2ddf37b | 2013-04-20 01:15:58 | [diff] [blame] | 996 | "disable-minimize-on-second-launcher-item-click", |
| 997 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME, |
| 998 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION, |
| 999 | kOsAll, |
| 1000 | SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick) |
| 1001 | }, |
| 1002 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 1003 | "show-touch-hud", |
| 1004 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 1005 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 1006 | kOsAll, |
| 1007 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 1008 | }, |
| 1009 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 1010 | "enable-pinch", |
| 1011 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 1012 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 1013 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 1014 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 1015 | }, |
[email protected] | adcdcdd0 | 2014-04-25 03:30:24 | [diff] [blame] | 1016 | #endif // defined(USE_ASH) |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 1017 | { |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 1018 | "enable-pinch-virtual-viewport", |
| 1019 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME, |
| 1020 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION, |
[email protected] | fe89d82 | 2014-04-28 10:29:00 | [diff] [blame] | 1021 | kOsLinux | kOsWin | kOsCrOS | kOsAndroid, |
| 1022 | ENABLE_DISABLE_VALUE_TYPE( |
| 1023 | cc::switches::kEnablePinchVirtualViewport, |
| 1024 | cc::switches::kDisablePinchVirtualViewport), |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 1025 | }, |
[email protected] | 68bc37c | 2014-01-07 15:56:48 | [diff] [blame] | 1026 | { |
| 1027 | "enable-viewport-meta", |
| 1028 | IDS_FLAGS_ENABLE_VIEWPORT_META_NAME, |
| 1029 | IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION, |
| 1030 | kOsLinux | kOsWin | kOsCrOS | kOsMac, |
| 1031 | SINGLE_VALUE_TYPE(switches::kEnableViewportMeta), |
| 1032 | }, |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 1033 | #if defined(OS_CHROMEOS) |
| 1034 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1035 | "disable-boot-animation", |
| 1036 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 1037 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 1038 | kOsCrOSOwnerOnly, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1039 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation), |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1040 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 1041 | { |
[email protected] | d739c1db | 2014-07-08 07:19:59 | [diff] [blame] | 1042 | "enable-video-player-chromecast-support", |
| 1043 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME, |
| 1044 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION, |
| 1045 | kOsCrOS, |
| 1046 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport) |
| 1047 | }, |
| 1048 | { |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1049 | "disable-office-editing-component-app", |
| 1050 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME, |
| 1051 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION, |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1052 | kOsCrOS, |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1053 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp), |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1054 | }, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1055 | { |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 1056 | "disable-display-color-calibration", |
| 1057 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, |
| 1058 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, |
| 1059 | kOsCrOS, |
| 1060 | SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), |
| 1061 | }, |
jonross | 98fccbf6 | 2015-02-05 22:13:58 | [diff] [blame] | 1062 | { |
| 1063 | "ash-disable-screen-orientation-lock", |
| 1064 | IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME, |
| 1065 | IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION, |
| 1066 | kOsCrOS, |
| 1067 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock), |
| 1068 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1069 | #endif // defined(OS_CHROMEOS) |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1070 | { "disable-accelerated-video-decode", |
| 1071 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1072 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
sandersd | f4e60796 | 2015-01-15 20:30:52 | [diff] [blame] | 1073 | kOsMac | kOsWin | kOsCrOS, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1074 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1075 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1076 | #if defined(USE_ASH) |
[email protected] | 35c9a4e | 2013-09-14 01:32:38 | [diff] [blame] | 1077 | { |
| 1078 | "ash-debug-shortcuts", |
| 1079 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1080 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1081 | kOsAll, |
| 1082 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1083 | }, |
tdanderson | fd446a0 | 2015-03-30 21:51:00 | [diff] [blame] | 1084 | { |
| 1085 | "ash-disable-maximize-mode-window-backdrop", |
| 1086 | IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME, |
| 1087 | IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION, |
| 1088 | kOsCrOS, |
| 1089 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop), |
| 1090 | }, |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 1091 | { "ash-enable-touch-view-testing", |
| 1092 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME, |
| 1093 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION, |
| 1094 | kOsCrOS, |
| 1095 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting), |
| 1096 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1097 | { |
jonross | d24d766f | 2014-12-01 23:55:30 | [diff] [blame] | 1098 | "disable-touch-feedback", |
| 1099 | IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME, |
| 1100 | IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1101 | kOsCrOS, |
jonross | d24d766f | 2014-12-01 23:55:30 | [diff] [blame] | 1102 | SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback), |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1103 | }, |
oshima | 04a99582 | 2014-11-14 04:04:43 | [diff] [blame] | 1104 | { "ash-enable-mirrored-screen", |
| 1105 | IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME, |
| 1106 | IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION, |
| 1107 | kOsCrOS, |
| 1108 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen), |
| 1109 | }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 1110 | { |
| 1111 | "ash-enable-screen-rotation-animations", |
| 1112 | IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME, |
| 1113 | IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION, |
| 1114 | kOsCrOS, |
| 1115 | MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices) |
| 1116 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1117 | #endif // defined(USE_ASH) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1118 | #if defined(OS_CHROMEOS) |
| 1119 | { |
smckay | ad90351f | 2015-02-09 22:40:19 | [diff] [blame] | 1120 | "disable-cloud-import", |
| 1121 | IDS_FLAGS_DISABLE_CLOUD_IMPORT, |
| 1122 | IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION, |
smckay | 451de88 | 2014-10-22 21:43:29 | [diff] [blame] | 1123 | kOsCrOS, |
smckay | ad90351f | 2015-02-09 22:40:19 | [diff] [blame] | 1124 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport) |
smckay | 451de88 | 2014-10-22 21:43:29 | [diff] [blame] | 1125 | }, |
| 1126 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1127 | "enable-request-tablet-site", |
| 1128 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1129 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1130 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1131 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1132 | }, |
| 1133 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1134 | { |
| 1135 | "debug-packed-apps", |
| 1136 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1137 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1138 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1139 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1140 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1141 | { |
| 1142 | "enable-password-generation", |
| 1143 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1144 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
rouslan | b2237a9c | 2014-10-28 00:58:47 | [diff] [blame] | 1145 | kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, |
[email protected] | c3cc063 | 2013-10-03 21:54:43 | [diff] [blame] | 1146 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration, |
| 1147 | autofill::switches::kDisablePasswordGeneration) |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1148 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1149 | { |
[email protected] | 0477c06 | 2014-04-30 15:02:18 | [diff] [blame] | 1150 | "enable-automatic-password-saving", |
| 1151 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME, |
| 1152 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION, |
| 1153 | kOsDesktop, |
| 1154 | SINGLE_VALUE_TYPE( |
| 1155 | password_manager::switches::kEnableAutomaticPasswordSaving) |
| 1156 | }, |
| 1157 | { |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1158 | "password-manager-reauthentication", |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1159 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME, |
| 1160 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION, |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 1161 | kOsMac | kOsWin, |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1162 | SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1163 | }, |
| 1164 | { |
Garrett Casto | 2229912 | 2014-11-03 21:35:47 | [diff] [blame] | 1165 | "enable-password-link", |
| 1166 | IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME, |
| 1167 | IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION, |
| 1168 | kOsAndroid | kOsDesktop, |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1169 | ENABLE_DISABLE_VALUE_TYPE( |
Garrett Casto | 2229912 | 2014-11-03 21:35:47 | [diff] [blame] | 1170 | password_manager::switches::kEnablePasswordLink, |
| 1171 | password_manager::switches::kDisablePasswordLink) |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1172 | }, |
| 1173 | { |
dvadym | d933d20f | 2015-01-09 21:57:51 | [diff] [blame] | 1174 | "enable-password-save-in-page-navigation", |
| 1175 | IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_NAME, |
| 1176 | IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_DESCRIPTION, |
| 1177 | kOsAll, |
| 1178 | SINGLE_VALUE_TYPE( |
| 1179 | autofill::switches::kEnablePasswordSaveOnInPageNavigation) |
| 1180 | }, |
| 1181 | { |
engedy | a4b285e | 2015-02-04 12:30:21 | [diff] [blame] | 1182 | "enable-affiliation-based-matching", |
| 1183 | IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME, |
| 1184 | IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION, |
| 1185 | kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, |
| 1186 | ENABLE_DISABLE_VALUE_TYPE( |
| 1187 | password_manager::switches::kEnableAffiliationBasedMatching, |
| 1188 | password_manager::switches::kDisableAffiliationBasedMatching) |
| 1189 | }, |
| 1190 | { |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1191 | "enable-deferred-image-decoding", |
| 1192 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME, |
| 1193 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1194 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1195 | SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding) |
| 1196 | }, |
| 1197 | { |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1198 | "wallet-service-use-sandbox", |
| 1199 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
| 1200 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, |
[email protected] | d4d5999 | 2014-06-04 23:48:07 | [diff] [blame] | 1201 | kOsAndroid | kOsDesktop, |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1202 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1203 | autofill::switches::kWalletServiceUseSandbox, "1", |
| 1204 | autofill::switches::kWalletServiceUseSandbox, "0") |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1205 | }, |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1206 | #if defined(USE_AURA) |
| 1207 | { |
| 1208 | "overscroll-history-navigation", |
| 1209 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
| 1210 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, |
| 1211 | kOsAll, |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 1212 | MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices) |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1213 | }, |
| 1214 | #endif |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1215 | { |
[email protected] | 888878e8 | 2013-07-24 22:49:40 | [diff] [blame] | 1216 | "scroll-end-effect", |
| 1217 | IDS_FLAGS_SCROLL_END_EFFECT_NAME, |
| 1218 | IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION, |
| 1219 | kOsCrOS, |
| 1220 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1221 | switches::kScrollEndEffect, "1", |
| 1222 | switches::kScrollEndEffect, "0") |
| 1223 | }, |
| 1224 | { |
beaudoin | 4e5b2bba | 2015-03-26 16:06:55 | [diff] [blame] | 1225 | "enable-icon-ntp", |
| 1226 | IDS_FLAGS_ENABLE_ICON_NTP_NAME, |
| 1227 | IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION, |
| 1228 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1229 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp, |
| 1230 | switches::kDisableIconNtp) |
| 1231 | }, |
| 1232 | { |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1233 | "enable-touch-drag-drop", |
| 1234 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1235 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1236 | kOsWin | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1237 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop, |
| 1238 | switches::kDisableTouchDragDrop) |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1239 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1240 | { |
| 1241 | "enable-touch-editing", |
| 1242 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1243 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
[email protected] | 877dd94 | 2014-06-06 16:02:01 | [diff] [blame] | 1244 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1245 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing, |
| 1246 | switches::kDisableTouchEditing) |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1247 | }, |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1248 | { |
mfomitchev | 5ad034ec | 2015-04-24 21:57:27 | [diff] [blame] | 1249 | "touch-selection-strategy", |
| 1250 | IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME, |
| 1251 | IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION, |
| 1252 | kOsAndroid, // TODO(mfomitchev): Add CrOS/Win/Linux support soon. |
| 1253 | MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices) |
| 1254 | }, |
| 1255 | { |
ricea | 64c07d79 | 2014-10-08 03:37:00 | [diff] [blame] | 1256 | "enable-stale-while-revalidate", |
| 1257 | IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME, |
| 1258 | IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION, |
| 1259 | kOsAll, |
| 1260 | SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate) |
| 1261 | }, |
| 1262 | { |
[email protected] | 06a82ff | 2014-04-25 02:24:46 | [diff] [blame] | 1263 | "enable-suggestions-service", |
| 1264 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME, |
| 1265 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION, |
| 1266 | kOsAndroid | kOsCrOS, |
| 1267 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, |
| 1268 | switches::kDisableSuggestionsService) |
| 1269 | }, |
| 1270 | { |
treib | 1a600c7 | 2015-02-09 13:47:56 | [diff] [blame] | 1271 | "enable-supervised-user-managed-bookmarks-folder", |
| 1272 | IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME, |
| 1273 | IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION, |
| 1274 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1275 | SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder) |
| 1276 | }, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1277 | #if defined(ENABLE_APP_LIST) |
| 1278 | { |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1279 | "enable-sync-app-list", |
| 1280 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME, |
| 1281 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1282 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1283 | ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList, |
| 1284 | app_list::switches::kDisableSyncAppList) |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1285 | }, |
| 1286 | #endif |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1287 | #if defined(OS_MACOSX) |
| 1288 | { |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1289 | "enable-avfoundation", |
| 1290 | IDS_FLAGS_ENABLE_AVFOUNDATION_NAME, |
| 1291 | IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1292 | kOsMac, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1293 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation, |
| 1294 | switches::kForceQTKit) |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1295 | }, |
| 1296 | #endif |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1297 | { |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1298 | "lcd-text-aa", |
| 1299 | IDS_FLAGS_LCD_TEXT_NAME, |
| 1300 | IDS_FLAGS_LCD_TEXT_DESCRIPTION, |
| 1301 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1302 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText, |
| 1303 | switches::kDisableLCDText) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1304 | }, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1305 | #if defined(OS_ANDROID) || defined(OS_MACOSX) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1306 | { |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1307 | "delegated-renderer", |
| 1308 | IDS_FLAGS_DELEGATED_RENDERER_NAME, |
| 1309 | IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1310 | kOsAndroid, // TODO(ccameron) Add mac support soon. |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1311 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer, |
| 1312 | switches::kDisableDelegatedRenderer) |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1313 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1314 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1315 | { |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1316 | "max-tiles-for-interest-area", |
| 1317 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME, |
| 1318 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1319 | kOsAll, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1320 | MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices) |
| 1321 | }, |
[email protected] | 7cf7ccb | 2013-04-20 02:53:08 | [diff] [blame] | 1322 | { |
brettw | 61a39cf | 2015-03-30 21:24:14 | [diff] [blame] | 1323 | "enable-offer-store-unmasked-wallet-cards", |
| 1324 | IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS, |
| 1325 | IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION, |
| 1326 | kOsAll, |
| 1327 | ENABLE_DISABLE_VALUE_TYPE( |
| 1328 | autofill::switches::kEnableOfferStoreUnmaskedWalletCards, |
| 1329 | autofill::switches::kDisableOfferStoreUnmaskedWalletCards) |
| 1330 | }, |
| 1331 | { |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1332 | "enable-offline-auto-reload", |
| 1333 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME, |
| 1334 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION, |
| 1335 | kOsAll, |
[email protected] | bd519e3 | 2014-05-09 01:33:17 | [diff] [blame] | 1336 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload, |
| 1337 | switches::kDisableOfflineAutoReload) |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1338 | }, |
| 1339 | { |
[email protected] | d2e1a0a | 2014-06-16 15:49:37 | [diff] [blame] | 1340 | "enable-offline-auto-reload-visible-only", |
| 1341 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME, |
| 1342 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION, |
| 1343 | kOsAll, |
| 1344 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly, |
| 1345 | switches::kDisableOfflineAutoReloadVisibleOnly) |
| 1346 | }, |
| 1347 | { |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 1348 | "show-saved-copy", |
| 1349 | IDS_FLAGS_SHOW_SAVED_COPY_NAME, |
| 1350 | IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION, |
afakhry | f0227a0 | 2014-11-17 23:12:41 | [diff] [blame] | 1351 | kOsAll, |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 1352 | MULTI_VALUE_TYPE(kShowSavedCopyChoices) |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1353 | }, |
| 1354 | { |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1355 | "default-tile-width", |
| 1356 | IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME, |
| 1357 | IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION, |
| 1358 | kOsAll, |
| 1359 | MULTI_VALUE_TYPE(kDefaultTileWidthChoices) |
| 1360 | }, |
| 1361 | { |
| 1362 | "default-tile-height", |
| 1363 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME, |
| 1364 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION, |
| 1365 | kOsAll, |
| 1366 | MULTI_VALUE_TYPE(kDefaultTileHeightChoices) |
| 1367 | }, |
[email protected] | 2289b43 | 2014-08-08 17:52:11 | [diff] [blame] | 1368 | #if defined(OS_ANDROID) |
| 1369 | { |
| 1370 | "disable-gesture-requirement-for-media-playback", |
| 1371 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1372 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1373 | kOsAndroid, |
| 1374 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1375 | }, |
| 1376 | #endif |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1377 | #if defined(OS_CHROMEOS) |
| 1378 | { |
| 1379 | "enable-virtual-keyboard", |
| 1380 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1381 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1382 | kOsCrOS, |
| 1383 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1384 | }, |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1385 | { |
[email protected] | bb6378fe | 2014-04-28 21:19:44 | [diff] [blame] | 1386 | "enable-virtual-keyboard-overscroll", |
| 1387 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME, |
| 1388 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION, |
| 1389 | kOsCrOS, |
| 1390 | ENABLE_DISABLE_VALUE_TYPE( |
| 1391 | keyboard::switches::kEnableVirtualKeyboardOverscroll, |
| 1392 | keyboard::switches::kDisableVirtualKeyboardOverscroll) |
| 1393 | }, |
| 1394 | { |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1395 | "enable-swipe-selection", |
| 1396 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME, |
| 1397 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION, |
| 1398 | kOsCrOS, |
| 1399 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection) |
| 1400 | }, |
[email protected] | 0e627fb1 | 2014-03-25 18:18:53 | [diff] [blame] | 1401 | { |
| 1402 | "enable-input-view", |
| 1403 | IDS_FLAGS_ENABLE_INPUT_VIEW_NAME, |
| 1404 | IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION, |
| 1405 | kOsCrOS, |
| 1406 | ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView, |
| 1407 | keyboard::switches::kDisableInputView) |
| 1408 | }, |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1409 | { |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1410 | "enable-new-korean-ime", |
| 1411 | IDS_FLAGS_ENABLE_NEW_KOREAN_IME_NAME, |
| 1412 | IDS_FLAGS_ENABLE_NEW_KOREAN_IME_DESCRIPTION, |
| 1413 | kOsCrOS, |
| 1414 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewKoreanIme) |
| 1415 | }, |
| 1416 | { |
fengyuan | 0ad7e334 | 2015-03-25 06:44:11 | [diff] [blame] | 1417 | "disable-new-md-input-view", |
| 1418 | IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME, |
| 1419 | IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION, |
fengyuan | da3e4fb | 2014-12-08 15:46:27 | [diff] [blame] | 1420 | kOsCrOS, |
rsadam | ba9ebf7 | 2015-05-05 17:40:56 | [diff] [blame^] | 1421 | SINGLE_VALUE_TYPE(keyboard::switches::kDisableNewMDInputView) |
fengyuan | da3e4fb | 2014-12-08 15:46:27 | [diff] [blame] | 1422 | }, |
| 1423 | { |
shuchen | ae80909 | 2015-02-15 05:26:47 | [diff] [blame] | 1424 | "enable-physical-keyboard-autocorrect", |
| 1425 | IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME, |
| 1426 | IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION, |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1427 | kOsCrOS, |
shuchen | ae80909 | 2015-02-15 05:26:47 | [diff] [blame] | 1428 | ENABLE_DISABLE_VALUE_TYPE( |
| 1429 | chromeos::switches::kEnablePhysicalKeyboardAutocorrect, |
| 1430 | chromeos::switches::kDisablePhysicalKeyboardAutocorrect) |
shuchen | 3efbc418 | 2015-01-20 06:54:36 | [diff] [blame] | 1431 | }, |
| 1432 | { |
| 1433 | "disable-voice-input", |
| 1434 | IDS_FLAGS_DISABLE_VOICE_INPUT_NAME, |
| 1435 | IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION, |
| 1436 | kOsCrOS, |
rsadam | ba9ebf7 | 2015-05-05 17:40:56 | [diff] [blame^] | 1437 | SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput) |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1438 | }, |
| 1439 | { |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1440 | "enable-experimental-input-view-features", |
| 1441 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME, |
| 1442 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION, |
| 1443 | kOsCrOS, |
| 1444 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures) |
| 1445 | }, |
rsadam | 9172bc8a | 2014-10-29 23:37:38 | [diff] [blame] | 1446 | { |
bshe | b67430e | 2015-04-30 14:02:11 | [diff] [blame] | 1447 | "floating-virtual-keyboard", |
| 1448 | IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME, |
| 1449 | IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1450 | kOsCrOS, |
| 1451 | MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices) |
| 1452 | }, |
| 1453 | { |
stevet | 37b682b | 2015-01-22 14:37:16 | [diff] [blame] | 1454 | "enable-gesture-typing", |
| 1455 | IDS_FLAGS_ENABLE_GESTURE_TYPING_NAME, |
| 1456 | IDS_FLAGS_ENABLE_GESTURE_TYPING_DESCRIPTION, |
| 1457 | kOsCrOS, |
| 1458 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureTyping) |
| 1459 | }, |
| 1460 | { |
rsadam | 0a9d935 | 2015-03-12 16:31:13 | [diff] [blame] | 1461 | "enable-gesture-deletion", |
| 1462 | IDS_FLAGS_ENABLE_GESTURE_DELETION_NAME, |
| 1463 | IDS_FLAGS_ENABLE_GESTURE_DELETION_DESCRIPTION, |
| 1464 | kOsCrOS, |
| 1465 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureDeletion) |
| 1466 | }, |
| 1467 | { |
| 1468 | "enable-gesture-selection", |
| 1469 | IDS_FLAGS_ENABLE_GESTURE_SELECTION_NAME, |
| 1470 | IDS_FLAGS_ENABLE_GESTURE_SELECTION_DESCRIPTION, |
| 1471 | kOsCrOS, |
| 1472 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureSelection) |
| 1473 | }, |
| 1474 | { |
rsadam | bf65822 | 2015-01-20 16:52:55 | [diff] [blame] | 1475 | "disable-smart-virtual-keyboard", |
| 1476 | IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_NAME, |
| 1477 | IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_DESCRIPTION, |
rsadam | 9172bc8a | 2014-10-29 23:37:38 | [diff] [blame] | 1478 | kOsCrOS, |
rsadam | bf65822 | 2015-01-20 16:52:55 | [diff] [blame] | 1479 | SINGLE_VALUE_TYPE(keyboard::switches::kDisableSmartVirtualKeyboard) |
rsadam | 9172bc8a | 2014-10-29 23:37:38 | [diff] [blame] | 1480 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1481 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1482 | { |
| 1483 | "enable-simple-cache-backend", |
| 1484 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1485 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
[email protected] | 957cd5a | 2014-03-27 19:54:17 | [diff] [blame] | 1486 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1487 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1488 | }, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1489 | { |
| 1490 | "enable-tcp-fast-open", |
| 1491 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME, |
| 1492 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION, |
[email protected] | d0a8a16 | 2013-04-13 01:37:11 | [diff] [blame] | 1493 | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1494 | SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen) |
| 1495 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1496 | #if defined(ENABLE_SERVICE_DISCOVERY) |
[email protected] | a4ed7e1 | 2013-05-24 01:00:28 | [diff] [blame] | 1497 | { |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1498 | "device-discovery-notifications", |
| 1499 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME, |
| 1500 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1501 | kOsDesktop, |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1502 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications, |
| 1503 | switches::kDisableDeviceDiscoveryNotifications) |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1504 | }, |
[email protected] | 53ffe0d | 2013-10-30 01:20:40 | [diff] [blame] | 1505 | { |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1506 | "enable-print-preview-register-promos", |
| 1507 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME, |
| 1508 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1509 | kOsDesktop, |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1510 | SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos) |
| 1511 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1512 | #endif // ENABLE_SERVICE_DISCOVERY |
[email protected] | ca53b14 | 2014-02-25 22:42:23 | [diff] [blame] | 1513 | #if defined(OS_WIN) |
| 1514 | { |
| 1515 | "enable-cloud-print-xps", |
| 1516 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME, |
| 1517 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION, |
| 1518 | kOsWin, |
| 1519 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps) |
| 1520 | }, |
| 1521 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 1522 | #if defined(USE_AURA) |
| 1523 | { |
| 1524 | "tab-capture-upscale-quality", |
| 1525 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1526 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1527 | kOsAll, |
| 1528 | MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1529 | }, |
| 1530 | { |
| 1531 | "tab-capture-downscale-quality", |
| 1532 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1533 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1534 | kOsAll, |
| 1535 | MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1536 | }, |
| 1537 | #endif |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1538 | #if defined(TOOLKIT_VIEWS) |
| 1539 | { |
tdanderson | 5c0b95bd | 2015-03-12 19:40:48 | [diff] [blame] | 1540 | "disable-hide-inactive-stacked-tab-close-buttons", |
| 1541 | IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME, |
| 1542 | IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION, |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1543 | kOsCrOS | kOsWin | kOsLinux, |
tdanderson | 5c0b95bd | 2015-03-12 19:40:48 | [diff] [blame] | 1544 | SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons) |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1545 | }, |
| 1546 | #endif |
rouslan | c9c5b39a | 2015-03-25 19:58:36 | [diff] [blame] | 1547 | #if defined(ENABLE_SPELLCHECK) |
| 1548 | { |
| 1549 | "enable-spelling-feedback-field-trial", |
| 1550 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME, |
| 1551 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION, |
| 1552 | kOsAll, |
| 1553 | SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial) |
| 1554 | }, |
| 1555 | #endif |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1556 | { |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1557 | "enable-webgl-draft-extensions", |
| 1558 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME, |
| 1559 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION, |
| 1560 | kOsAll, |
| 1561 | SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions) |
| 1562 | }, |
[email protected] | deadc49 | 2013-06-07 21:39:28 | [diff] [blame] | 1563 | { |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1564 | "enable-new-profile-management", |
| 1565 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME, |
| 1566 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION, |
[email protected] | a3b75bd | 2014-05-28 17:49:42 | [diff] [blame] | 1567 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1568 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement, |
| 1569 | switches::kDisableNewProfileManagement) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1570 | }, |
| 1571 | { |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1572 | "enable-account-consistency", |
| 1573 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME, |
| 1574 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION, |
| 1575 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1576 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency, |
| 1577 | switches::kDisableAccountConsistency) |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1578 | }, |
| 1579 | { |
[email protected] | 8f56988 | 2014-03-25 21:12:12 | [diff] [blame] | 1580 | "enable-fast-user-switching", |
| 1581 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME, |
| 1582 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION, |
| 1583 | kOsMac | kOsWin | kOsLinux, |
| 1584 | SINGLE_VALUE_TYPE(switches::kFastUserSwitching) |
| 1585 | }, |
| 1586 | { |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1587 | "enable-new-avatar-menu", |
| 1588 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME, |
| 1589 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION, |
| 1590 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 9152a54 | 2014-08-06 05:37:45 | [diff] [blame] | 1591 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu, |
| 1592 | switches::kDisableNewAvatarMenu) |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1593 | }, |
| 1594 | { |
rogerta | 334d8037 | 2015-01-07 23:10:20 | [diff] [blame] | 1595 | "enable-iframe-based-signin", |
| 1596 | IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME, |
| 1597 | IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION, |
guohui | 69cf1473 | 2014-10-24 17:14:21 | [diff] [blame] | 1598 | kOsMac | kOsWin | kOsLinux, |
rogerta | 334d8037 | 2015-01-07 23:10:20 | [diff] [blame] | 1599 | SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin) |
guohui | 69cf1473 | 2014-10-24 17:14:21 | [diff] [blame] | 1600 | }, |
| 1601 | { |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1602 | "enable-google-profile-info", |
| 1603 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME, |
| 1604 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION, |
[email protected] | a9bf7d6 | 2013-07-11 22:11:22 | [diff] [blame] | 1605 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1606 | SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1607 | }, |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1608 | { |
[email protected] | 056ed709 | 2014-01-09 12:57:21 | [diff] [blame] | 1609 | "reset-app-list-install-state", |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1610 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME, |
| 1611 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION, |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1612 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1613 | SINGLE_VALUE_TYPE(switches::kResetAppListInstallState) |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1614 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1615 | #if defined(ENABLE_APP_LIST) |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1616 | #if defined(OS_LINUX) |
| 1617 | { |
| 1618 | // This is compiled out on non-Linux platforms because otherwise it would be |
| 1619 | // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing. |
| 1620 | // TODO(mgiuca): Remove the #if when Aura is the default on Linux. |
| 1621 | "enable-app-list", |
| 1622 | IDS_FLAGS_ENABLE_APP_LIST_NAME, |
| 1623 | IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION, |
| 1624 | kOsLinux, |
| 1625 | SINGLE_VALUE_TYPE(switches::kEnableAppList) |
| 1626 | }, |
| 1627 | #endif |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1628 | #if defined(ENABLE_EXTENSIONS) |
| 1629 | { |
fsamuel | 89d8ecf | 2014-12-19 02:11:30 | [diff] [blame] | 1630 | "enable-surface-worker", |
| 1631 | IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME, |
| 1632 | IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION, |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1633 | kOsDesktop, |
fsamuel | 89d8ecf | 2014-12-19 02:11:30 | [diff] [blame] | 1634 | SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker) |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1635 | }, |
| 1636 | #endif |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1637 | { |
xiyuan | 37407a7 | 2014-10-15 00:06:22 | [diff] [blame] | 1638 | "disable-drive-apps-in-app-list", |
| 1639 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME, |
| 1640 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION, |
| 1641 | kOsCrOS, |
| 1642 | SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList) |
| 1643 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1644 | #endif |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1645 | #if defined(OS_ANDROID) |
| 1646 | { |
| 1647 | "enable-accessibility-tab-switcher", |
| 1648 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME, |
| 1649 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION, |
| 1650 | kOsAndroid, |
| 1651 | SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher) |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1652 | }, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1653 | { |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1654 | // TODO(dmazzoni): remove this flag when native android accessibility |
| 1655 | // ships in the stable channel. http://crbug.com/356775 |
| 1656 | "enable-accessibility-script-injection", |
| 1657 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME, |
| 1658 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1659 | kOsAndroid, |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1660 | // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION. |
| 1661 | SINGLE_VALUE_TYPE("enable-accessibility-script-injection") |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1662 | }, |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1663 | #endif |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1664 | { |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1665 | "enable-one-copy", |
| 1666 | IDS_FLAGS_ONE_COPY_NAME, |
| 1667 | IDS_FLAGS_ONE_COPY_DESCRIPTION, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 1668 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1669 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy, |
| 1670 | switches::kDisableOneCopy) |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1671 | }, |
| 1672 | { |
| 1673 | "enable-zero-copy", |
| 1674 | IDS_FLAGS_ZERO_COPY_NAME, |
| 1675 | IDS_FLAGS_ZERO_COPY_DESCRIPTION, |
| 1676 | kOsAll, |
reveman | 91a0a87 | 2014-11-04 03:40:32 | [diff] [blame] | 1677 | SINGLE_VALUE_TYPE(switches::kEnableZeroCopy) |
[email protected] | 4fdc518f | 2013-08-28 21:37:27 | [diff] [blame] | 1678 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1679 | #if defined(OS_CHROMEOS) |
| 1680 | { |
[email protected] | 407d82b | 2013-12-13 11:50:59 | [diff] [blame] | 1681 | "enable-first-run-ui-transitions", |
| 1682 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME, |
| 1683 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION, |
| 1684 | kOsCrOS, |
| 1685 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions) |
| 1686 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1687 | #endif |
[email protected] | ed1aab1 | 2013-10-08 14:27:07 | [diff] [blame] | 1688 | { |
benwells | a75f874b | 2015-02-07 04:15:14 | [diff] [blame] | 1689 | "disable-new-bookmark-apps", |
tapted | bf201644 | 2015-02-19 08:45:27 | [diff] [blame] | 1690 | IDS_FLAGS_NEW_BOOKMARK_APPS_NAME, |
| 1691 | IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION, |
mitchelljones | 6d1594de | 2014-12-02 01:42:44 | [diff] [blame] | 1692 | kOsWin | kOsCrOS | kOsLinux | kOsMac, |
tapted | bf201644 | 2015-02-19 08:45:27 | [diff] [blame] | 1693 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps, |
| 1694 | switches::kDisableNewBookmarkApps) |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1695 | }, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1696 | #if defined(OS_MACOSX) |
| 1697 | { |
mitchelljones | 3e8befd | 2015-02-13 01:06:12 | [diff] [blame] | 1698 | "disable-hosted-app-shim-creation", |
| 1699 | IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME, |
| 1700 | IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1701 | kOsMac, |
mitchelljones | 3e8befd | 2015-02-13 01:06:12 | [diff] [blame] | 1702 | SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation) |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1703 | }, |
mitchelljones | 3bc6ced | 2014-12-19 05:01:37 | [diff] [blame] | 1704 | { |
| 1705 | "enable-hosted-app-quit-notification", |
| 1706 | IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME, |
| 1707 | IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION, |
| 1708 | kOsMac, |
| 1709 | SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification) |
| 1710 | }, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1711 | #endif |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1712 | { |
benwells | 2946900 | 2014-12-09 08:02:59 | [diff] [blame] | 1713 | "enable-ephemeral-apps-in-webstore", |
| 1714 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME, |
| 1715 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1716 | kOsAll, |
benwells | 2946900 | 2014-12-09 08:02:59 | [diff] [blame] | 1717 | SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore) |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1718 | }, |
| 1719 | { |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1720 | "enable-linkable-ephemeral-apps", |
| 1721 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME, |
| 1722 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1723 | kOsAll, |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1724 | SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps) |
| 1725 | }, |
| 1726 | { |
[email protected] | 7d8056d | 2014-04-14 15:55:21 | [diff] [blame] | 1727 | "enable-service-worker-sync", |
| 1728 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME, |
| 1729 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION, |
| 1730 | kOsAll, |
| 1731 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync) |
| 1732 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1733 | #if defined(OS_ANDROID) |
| 1734 | { |
| 1735 | "disable-click-delay", |
| 1736 | IDS_FLAGS_DISABLE_CLICK_DELAY_NAME, |
| 1737 | IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION, |
| 1738 | kOsAndroid, |
| 1739 | // Java-only switch: CommandLine.DISABLE_CLICK_DELAY |
| 1740 | SINGLE_VALUE_TYPE("disable-click-delay") |
| 1741 | }, |
jdduke | 0fa51299 | 2014-11-21 03:18:45 | [diff] [blame] | 1742 | { |
| 1743 | "disable-pull-to-refresh-effect", |
| 1744 | IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME, |
| 1745 | IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION, |
| 1746 | kOsAndroid, |
| 1747 | SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect) |
| 1748 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1749 | #endif |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1750 | #if defined(OS_MACOSX) |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1751 | { |
| 1752 | "enable-translate-new-ux", |
| 1753 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME, |
| 1754 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1755 | kOsMac, |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1756 | SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX) |
| 1757 | }, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1758 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1759 | #if defined(TOOLKIT_VIEWS) |
| 1760 | { |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1761 | "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA |
| 1762 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME, |
| 1763 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION, |
[email protected] | 42f5fe54 | 2014-07-25 17:59:33 | [diff] [blame] | 1764 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1765 | SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1766 | }, |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1767 | { |
luken | 30ef562 | 2014-11-24 19:37:55 | [diff] [blame] | 1768 | "enable-link-disambiguation-popup", |
| 1769 | IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME, |
| 1770 | IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION, |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1771 | kOsCrOS | kOsWin, |
luken | 30ef562 | 2014-11-24 19:37:55 | [diff] [blame] | 1772 | SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup) |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1773 | }, |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1774 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1775 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1776 | { |
| 1777 | "enable-apps-show-on-first-paint", |
| 1778 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, |
| 1779 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION, |
| 1780 | kOsDesktop, |
[email protected] | 6fa20245 | 2014-08-19 05:34:07 | [diff] [blame] | 1781 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1782 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1783 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1784 | { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1785 | "enhanced-bookmarks-experiment", |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1786 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1787 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1788 | kOsDesktop | kOsAndroid, |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1789 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1790 | switches::kEnhancedBookmarksExperiment, "1", |
| 1791 | switches::kEnhancedBookmarksExperiment, "0") |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1792 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1793 | #if defined(OS_ANDROID) |
| 1794 | { |
| 1795 | "enable-zero-suggest-experiment", |
| 1796 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME, |
| 1797 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION, |
| 1798 | kOsAndroid, |
| 1799 | MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices) |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1800 | }, |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1801 | { |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 1802 | "reader-mode-heuristics", |
| 1803 | IDS_FLAGS_READER_MODE_HEURISTICS_NAME, |
| 1804 | IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION, |
| 1805 | kOsAndroid, |
| 1806 | MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices) |
| 1807 | }, |
| 1808 | { |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1809 | "enable-reader-mode-toolbar-icon", |
| 1810 | IDS_FLAGS_READER_MODE_EXPERIMENT_NAME, |
| 1811 | IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION, |
| 1812 | kOsAndroid, |
| 1813 | SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon) |
| 1814 | }, |
aruslan | d4c3a50 | 2015-04-03 16:38:51 | [diff] [blame] | 1815 | { |
| 1816 | "enable-dom-distiller-button-animation", |
| 1817 | IDS_FLAGS_READER_MODE_BUTTON_ANIMATION, |
| 1818 | IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION, |
| 1819 | kOsAndroid, |
| 1820 | SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation) |
| 1821 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1822 | #endif |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1823 | { |
| 1824 | "num-raster-threads", |
| 1825 | IDS_FLAGS_NUM_RASTER_THREADS_NAME, |
| 1826 | IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, |
| 1827 | kOsAll, |
| 1828 | MULTI_VALUE_TYPE(kNumRasterThreadsChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1829 | }, |
| 1830 | { |
brettw | b505b7a | 2014-11-26 22:05:32 | [diff] [blame] | 1831 | "enable-single-click-autofill", |
| 1832 | IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME, |
| 1833 | IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION, |
rouslan | c291fa67 | 2014-12-04 23:45:16 | [diff] [blame] | 1834 | kOsCrOS | kOsMac | kOsWin | kOsLinux | kOsAndroid, |
brettw | b505b7a | 2014-11-26 22:05:32 | [diff] [blame] | 1835 | ENABLE_DISABLE_VALUE_TYPE( |
| 1836 | autofill::switches::kEnableSingleClickAutofill, |
| 1837 | autofill::switches::kDisableSingleClickAutofill) |
| 1838 | }, |
| 1839 | { |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1840 | "enable-permissions-bubbles", |
| 1841 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME, |
| 1842 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION, |
[email protected] | 4e6d54a | 2014-06-27 14:32:12 | [diff] [blame] | 1843 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 7d19822 | 2014-06-17 08:24:22 | [diff] [blame] | 1844 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles, |
| 1845 | switches::kDisablePermissionsBubbles) |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1846 | }, |
[email protected] | 4d11b08b | 2014-01-27 22:19:07 | [diff] [blame] | 1847 | { |
benwells | edf5e08 | 2015-04-23 02:45:14 | [diff] [blame] | 1848 | "enable-site-engagement-service", |
| 1849 | IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME, |
| 1850 | IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION, |
| 1851 | kOsAll, |
| 1852 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService, |
| 1853 | switches::kDisableSiteEngagementService) |
| 1854 | }, |
| 1855 | { |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1856 | "enable-session-crashed-bubble", |
| 1857 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME, |
| 1858 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION, |
| 1859 | kOsWin | kOsLinux, |
[email protected] | 3d990b7 | 2014-05-27 21:16:13 | [diff] [blame] | 1860 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble, |
| 1861 | switches::kDisableSessionCrashedBubble) |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1862 | }, |
| 1863 | { |
raymes | 35a4ea6 | 2014-11-26 00:49:14 | [diff] [blame] | 1864 | "enable-out-of-process-pdf", |
[email protected] | 1231adf | 2014-01-31 02:22:33 | [diff] [blame] | 1865 | IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME, |
| 1866 | IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION, |
| 1867 | kOsDesktop, |
raymes | 35a4ea6 | 2014-11-26 00:49:14 | [diff] [blame] | 1868 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf, |
| 1869 | switches::kDisableOutOfProcessPdf) |
[email protected] | 1231adf | 2014-01-31 02:22:33 | [diff] [blame] | 1870 | }, |
hclam | 674f12e | 2014-11-06 00:25:18 | [diff] [blame] | 1871 | { |
alexandrec | a3f5c41 | 2015-02-05 00:53:34 | [diff] [blame] | 1872 | "enable-pdf-material-ui", |
| 1873 | IDS_FLAGS_PDF_MATERIAL_UI_NAME, |
| 1874 | IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION, |
| 1875 | kOsDesktop, |
| 1876 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI, |
| 1877 | switches::kDisablePdfMaterialUI) |
| 1878 | }, |
| 1879 | { |
hclam | 674f12e | 2014-11-06 00:25:18 | [diff] [blame] | 1880 | "disable-cast-streaming-hw-encoding", |
| 1881 | IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME, |
| 1882 | IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION, |
| 1883 | kOsAll, |
| 1884 | SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding) |
| 1885 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1886 | #if defined(OS_ANDROID) |
| 1887 | { |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1888 | "disable-cast", |
| 1889 | IDS_FLAGS_DISABLE_CAST_NAME, |
| 1890 | IDS_FLAGS_DISABLE_CAST_DESCRIPTION, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1891 | kOsAndroid, |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1892 | SINGLE_VALUE_TYPE(switches::kDisableCast) |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1893 | }, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1894 | { |
| 1895 | "prefetch-search-results", |
| 1896 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME, |
| 1897 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1898 | kOsAndroid, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1899 | SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults) |
| 1900 | }, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1901 | #endif |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1902 | #if defined(ENABLE_APP_LIST) |
| 1903 | { |
| 1904 | "enable-experimental-app-list", |
| 1905 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, |
| 1906 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, |
| 1907 | kOsWin | kOsLinux | kOsCrOS, |
calamity | 9b4f185b | 2014-11-26 00:54:55 | [diff] [blame] | 1908 | ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList, |
| 1909 | app_list::switches::kDisableExperimentalAppList) |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1910 | }, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1911 | { |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1912 | "enable-centered-app-list", |
| 1913 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME, |
| 1914 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1915 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1916 | SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList) |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1917 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1918 | #endif |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 1919 | { |
jdduke | 2eee6cb | 2014-09-25 17:02:21 | [diff] [blame] | 1920 | "disable-threaded-scrolling", |
| 1921 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME, |
| 1922 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION, |
jdduke | 896a4d48 | 2015-04-02 02:05:18 | [diff] [blame] | 1923 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid | kOsMac, |
jdduke | 2eee6cb | 2014-09-25 17:02:21 | [diff] [blame] | 1924 | SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling) |
| 1925 | }, |
| 1926 | { |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1927 | "bleeding-edge-renderer-mode", |
| 1928 | IDS_FLAGS_BLEEDING_RENDERER_NAME, |
| 1929 | IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION, |
[email protected] | a8a9751 | 2014-03-24 18:28:20 | [diff] [blame] | 1930 | kOsAndroid, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1931 | SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths) |
| 1932 | }, |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1933 | { |
| 1934 | "enable-settings-window", |
| 1935 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME, |
| 1936 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION, |
| 1937 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1938 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow, |
| 1939 | switches::kDisableSettingsWindow) |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1940 | }, |
[email protected] | 812b82a | 2014-05-15 19:01:38 | [diff] [blame] | 1941 | #if defined(OS_ANDROID) |
| 1942 | { |
| 1943 | "enable-instant-search-clicks", |
| 1944 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME, |
| 1945 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION, |
| 1946 | kOsAndroid, |
| 1947 | SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks) |
| 1948 | }, |
| 1949 | #endif |
[email protected] | 4dffb66 | 2014-03-31 11:31:22 | [diff] [blame] | 1950 | { |
| 1951 | "enable-save-password-bubble", |
| 1952 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME, |
| 1953 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION, |
dconnelly | 35f985b3 | 2014-08-29 10:40:55 | [diff] [blame] | 1954 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | ea61c08 | 2014-04-07 16:57:24 | [diff] [blame] | 1955 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble, |
| 1956 | switches::kDisableSavePasswordBubble) |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1957 | }, |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1958 | { |
| 1959 | "enable-apps-file-associations", |
| 1960 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME, |
| 1961 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION, |
| 1962 | kOsMac, |
| 1963 | SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations) |
| 1964 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1965 | #if defined(OS_ANDROID) |
| 1966 | { |
| 1967 | "enable-embeddedsearch-api", |
| 1968 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME, |
| 1969 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION, |
| 1970 | kOsAndroid, |
| 1971 | SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) |
| 1972 | }, |
| 1973 | #endif |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1974 | { |
| 1975 | "distance-field-text", |
| 1976 | IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME, |
| 1977 | IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION, |
| 1978 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1979 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText, |
| 1980 | switches::kDisableDistanceFieldText) |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1981 | }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 1982 | { |
| 1983 | "extension-content-verification", |
| 1984 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME, |
| 1985 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION, |
| 1986 | kOsDesktop, |
| 1987 | MULTI_VALUE_TYPE(kExtensionContentVerificationChoices) |
| 1988 | }, |
[email protected] | 8f374ce | 2014-05-08 23:51:52 | [diff] [blame] | 1989 | #if defined(USE_AURA) |
| 1990 | { |
| 1991 | "text-input-focus-manager", |
| 1992 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME, |
| 1993 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION, |
| 1994 | kOsCrOS | kOsLinux | kOsWin, |
| 1995 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager, |
| 1996 | switches::kDisableTextInputFocusManager) |
| 1997 | }, |
| 1998 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1999 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9858541 | 2014-05-13 19:01:37 | [diff] [blame] | 2000 | { |
| 2001 | "extension-active-script-permission", |
| 2002 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME, |
| 2003 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION, |
| 2004 | kOsAll, |
| 2005 | SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction) |
| 2006 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2007 | #endif |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 2008 | { |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 2009 | "answers-in-suggest", |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 2010 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME, |
| 2011 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION, |
dschuyler | caad9623 | 2015-04-13 22:22:50 | [diff] [blame] | 2012 | kOsAndroid | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2013 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest, |
| 2014 | switches::kDisableAnswersInSuggest) |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 2015 | }, |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2016 | #if defined(OS_ANDROID) |
| 2017 | { |
| 2018 | "enable-data-reduction-proxy-dev", |
| 2019 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME, |
| 2020 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION, |
| 2021 | kOsAndroid, |
| 2022 | ENABLE_DISABLE_VALUE_TYPE( |
| 2023 | data_reduction_proxy::switches::kEnableDataReductionProxyDev, |
| 2024 | data_reduction_proxy::switches::kDisableDataReductionProxyDev) |
| 2025 | }, |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 2026 | { |
| 2027 | "enable-data-reduction-proxy-alt", |
| 2028 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME, |
| 2029 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION, |
| 2030 | kOsAndroid, |
| 2031 | SINGLE_VALUE_TYPE( |
| 2032 | data_reduction_proxy::switches::kEnableDataReductionProxyAlt) |
| 2033 | }, |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2034 | #endif |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 2035 | { |
rlp | 69ebfce | 2014-11-18 21:03:46 | [diff] [blame] | 2036 | "enable-hotword-hardware", |
| 2037 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME, |
| 2038 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION, |
| 2039 | kOsCrOS, |
| 2040 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware) |
| 2041 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2042 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 409d920 | 2014-07-08 01:32:41 | [diff] [blame] | 2043 | { |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 2044 | "enable-embedded-extension-options", |
| 2045 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 2046 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 2047 | kOsDesktop, |
| 2048 | SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 2049 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2050 | #endif |
benwells | 89df419 | 2014-12-16 08:30:18 | [diff] [blame] | 2051 | #if defined(USE_ASH) |
| 2052 | { |
| 2053 | "enable-web-app-frame", |
| 2054 | IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME, |
| 2055 | IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION, |
| 2056 | kOsWin | kOsCrOS, |
| 2057 | SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame) |
| 2058 | }, |
| 2059 | #endif |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 2060 | { |
[email protected] | 3ba3eb71 | 2014-07-16 07:47:19 | [diff] [blame] | 2061 | "enable-website-settings-manager", |
| 2062 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME, |
| 2063 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION, |
| 2064 | kOsDesktop, |
| 2065 | SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager) |
| 2066 | }, |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 2067 | { |
| 2068 | "remember-cert-error-decisions", |
| 2069 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 2070 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 2071 | kOsAll, |
| 2072 | MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 2073 | }, |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 2074 | { |
| 2075 | "enable-drop-sync-credential", |
| 2076 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
| 2077 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
| 2078 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2079 | ENABLE_DISABLE_VALUE_TYPE( |
| 2080 | password_manager::switches::kEnableDropSyncCredential, |
| 2081 | password_manager::switches::kDisableDropSyncCredential) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2082 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2083 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2084 | { |
| 2085 | "enable-extension-action-redesign", |
| 2086 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, |
| 2087 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, |
rdevlin.cronin | d187a83 | 2015-01-06 01:15:52 | [diff] [blame] | 2088 | kOsDesktop, |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2089 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) |
| 2090 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2091 | #endif |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 2092 | { |
| 2093 | "autofill-sync-credential", |
| 2094 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 2095 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 2096 | kOsAll, |
| 2097 | MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 2098 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 2099 | #if !defined(OS_ANDROID) |
| 2100 | { |
| 2101 | "enable-message-center-always-scroll-up-upon-notification-removal", |
| 2102 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, |
| 2103 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, |
| 2104 | kOsDesktop, |
| 2105 | SINGLE_VALUE_TYPE( |
| 2106 | switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval) |
| 2107 | }, |
orenb | 5ee85fa | 2015-02-04 20:03:57 | [diff] [blame] | 2108 | { |
| 2109 | "enable-md-settings", |
| 2110 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME, |
| 2111 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION, |
| 2112 | kOsDesktop, |
| 2113 | SINGLE_VALUE_TYPE( |
| 2114 | switches::kEnableMaterialDesignSettings) |
| 2115 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 2116 | #endif |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 2117 | #if defined(OS_CHROMEOS) |
| 2118 | { |
skuhne | d17538a | 2015-01-15 15:53:09 | [diff] [blame] | 2119 | "disable-memory-pressure-chromeos", |
| 2120 | IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME, |
| 2121 | IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION, |
skuhne | f3f301b | 2014-12-10 21:04:14 | [diff] [blame] | 2122 | kOsCrOS, |
skuhne | d17538a | 2015-01-15 15:53:09 | [diff] [blame] | 2123 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS) |
skuhne | f3f301b | 2014-12-10 21:04:14 | [diff] [blame] | 2124 | }, |
| 2125 | { |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 2126 | "memory-pressure-thresholds", |
| 2127 | IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME, |
| 2128 | IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION, |
| 2129 | kOsCrOS, |
| 2130 | MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices) |
| 2131 | }, |
| 2132 | { |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 2133 | "wake-on-packets", |
| 2134 | IDS_FLAGS_WAKE_ON_PACKETS_NAME, |
| 2135 | IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION, |
| 2136 | kOsCrOSOwnerOnly, |
| 2137 | SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets) |
| 2138 | }, |
| 2139 | #endif // OS_CHROMEOS |
miu | 094342f | 2014-09-26 03:09:46 | [diff] [blame] | 2140 | { |
| 2141 | "enable-tab-audio-muting", |
| 2142 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME, |
| 2143 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION, |
miu | 2178ec8 | 2014-11-01 01:59:06 | [diff] [blame] | 2144 | kOsDesktop, |
miu | 094342f | 2014-09-26 03:09:46 | [diff] [blame] | 2145 | SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting) |
| 2146 | }, |
mkwst | 531d29fa | 2014-10-02 09:42:07 | [diff] [blame] | 2147 | { |
| 2148 | "enable-credential-manager-api", |
| 2149 | IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME, |
| 2150 | IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION, |
| 2151 | kOsAll, |
| 2152 | SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI) |
| 2153 | }, |
mkwst | ae2d6039 | 2014-11-11 07:41:45 | [diff] [blame] | 2154 | { |
| 2155 | "reduced-referrer-granularity", |
| 2156 | IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME, |
| 2157 | IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION, |
| 2158 | kOsAll, |
| 2159 | SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity) |
| 2160 | }, |
tommycli | 3c366b3 | 2014-10-06 23:05:46 | [diff] [blame] | 2161 | #if defined(ENABLE_PLUGINS) |
| 2162 | { |
| 2163 | "enable-plugin-power-saver", |
| 2164 | IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME, |
| 2165 | IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION, |
| 2166 | kOsDesktop, |
dbeam | 155ac97 | 2015-04-20 15:34:48 | [diff] [blame] | 2167 | ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver, |
| 2168 | plugins::switches::kDisablePluginPowerSaver) |
tommycli | 3c366b3 | 2014-10-06 23:05:46 | [diff] [blame] | 2169 | }, |
| 2170 | #endif |
kelvinp | 3b73f509 | 2014-10-07 21:49:39 | [diff] [blame] | 2171 | #if defined(OS_CHROMEOS) |
| 2172 | { |
mtomasz | 644ca40 | 2014-10-30 00:51:37 | [diff] [blame] | 2173 | "disable-new-zip-unpacker", |
| 2174 | IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME, |
| 2175 | IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION, |
| 2176 | kOsCrOS, |
| 2177 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker) |
agl | 0a4a1634 | 2014-11-05 04:17:05 | [diff] [blame] | 2178 | }, |
kelvinp | 3b73f509 | 2014-10-07 21:49:39 | [diff] [blame] | 2179 | #endif // defined(OS_CHROMEOS) |
agl | 0a4a1634 | 2014-11-05 04:17:05 | [diff] [blame] | 2180 | { |
| 2181 | "ssl-version-min", |
| 2182 | IDS_FLAGS_SSL_VERSION_MIN_NAME, |
| 2183 | IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION, |
| 2184 | kOsAll, |
| 2185 | MULTI_VALUE_TYPE(kSSLVersionMinChoices) |
| 2186 | }, |
rouslan | 497109da | 2014-11-26 20:30:34 | [diff] [blame] | 2187 | { |
| 2188 | "enable-credit-card-scan", |
| 2189 | IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME, |
| 2190 | IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION, |
| 2191 | kOsAndroid, |
rouslan | b3361bca | 2014-12-10 23:26:44 | [diff] [blame] | 2192 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan, |
| 2193 | autofill::switches::kDisableCreditCardScan) |
rouslan | 497109da | 2014-11-26 20:30:34 | [diff] [blame] | 2194 | }, |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2195 | #if defined(OS_CHROMEOS) |
| 2196 | { |
alemate | 2a7034b6 | 2015-04-01 16:06:25 | [diff] [blame] | 2197 | "disable-captive-portal-bypass-proxy", |
| 2198 | IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME, |
| 2199 | IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION, |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2200 | kOsCrOS, |
alemate | 2a7034b6 | 2015-04-01 16:06:25 | [diff] [blame] | 2201 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy) |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2202 | }, |
jshin | be0a2b0 | 2014-12-09 01:23:45 | [diff] [blame] | 2203 | { |
xdai | d5f777b | 2015-01-30 00:57:51 | [diff] [blame] | 2204 | "disable-roboto-font-ui", |
| 2205 | IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_NAME, |
| 2206 | IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_DESCRIPTION, |
jshin | be0a2b0 | 2014-12-09 01:23:45 | [diff] [blame] | 2207 | kOsCrOS, |
xdai | d5f777b | 2015-01-30 00:57:51 | [diff] [blame] | 2208 | SINGLE_VALUE_TYPE(switches::kDisableRobotoFontUI) |
jshin | be0a2b0 | 2014-12-09 01:23:45 | [diff] [blame] | 2209 | }, |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2210 | #endif // defined(OS_CHROMEOS) |
rsesek | a30ebba | 2014-12-01 21:55:54 | [diff] [blame] | 2211 | #if defined(OS_ANDROID) |
| 2212 | { |
| 2213 | "enable-seccomp-filter-sandbox", |
| 2214 | IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME, |
| 2215 | IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION, |
| 2216 | kOsAndroid, |
| 2217 | SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox) |
| 2218 | }, |
| 2219 | #endif |
lanwei | d74bc3e1 | 2014-12-03 23:12:29 | [diff] [blame] | 2220 | { |
| 2221 | "enable-touch-hover", |
| 2222 | IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME, |
| 2223 | IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION, |
| 2224 | kOsAndroid, |
| 2225 | SINGLE_VALUE_TYPE("enable-touch-hover") |
| 2226 | }, |
jww | 2035507 | 2014-12-12 21:00:55 | [diff] [blame] | 2227 | { |
| 2228 | "enable-fill-on-account-select", |
| 2229 | IDS_FILL_ON_ACCOUNT_SELECT_NAME, |
| 2230 | IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, |
| 2231 | kOsAll, |
jww | c3ab6e7b | 2014-12-23 18:16:18 | [diff] [blame] | 2232 | MULTI_VALUE_TYPE(kFillOnAccountSelectChoices) |
jww | 2035507 | 2014-12-12 21:00:55 | [diff] [blame] | 2233 | }, |
quiche | 4ab4911 | 2015-01-05 18:07:49 | [diff] [blame] | 2234 | #if defined(OS_CHROMEOS) |
| 2235 | { |
| 2236 | "enable-wifi-credential-sync", // FLAGS:RECORD_UMA |
| 2237 | IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME, |
| 2238 | IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION, |
| 2239 | kOsCrOS, |
| 2240 | SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync) |
| 2241 | }, |
mkwst | 0554410 | 2015-01-10 20:26:16 | [diff] [blame] | 2242 | { |
| 2243 | "enable-potentially-annoying-security-features", |
| 2244 | IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME, |
| 2245 | IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, |
| 2246 | kOsAll, |
| 2247 | SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures) |
| 2248 | }, |
quiche | 4ab4911 | 2015-01-05 18:07:49 | [diff] [blame] | 2249 | #endif |
bjornv | 3a1fa64 | 2015-01-13 09:19:01 | [diff] [blame] | 2250 | { |
| 2251 | "enable-delay-agnostic-aec", |
| 2252 | IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME, |
| 2253 | IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION, |
| 2254 | kOsDesktop, |
| 2255 | SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec) |
| 2256 | }, |
palmer | 601fe3c | 2015-01-23 20:43:02 | [diff] [blame] | 2257 | { |
| 2258 | "mark-non-secure-as", // FLAGS:RECORD_UMA |
| 2259 | IDS_MARK_NON_SECURE_AS_NAME, |
| 2260 | IDS_MARK_NON_SECURE_AS_DESCRIPTION, |
| 2261 | kOsAll, |
| 2262 | MULTI_VALUE_TYPE(kMarkNonSecureAsChoices) |
| 2263 | }, |
dcheng | e52b234 | 2015-01-27 22:45:42 | [diff] [blame] | 2264 | { |
| 2265 | "enable-site-per-process", |
| 2266 | IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME, |
| 2267 | IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION, |
| 2268 | kOsAll, |
| 2269 | SINGLE_VALUE_TYPE(switches::kSitePerProcess) |
| 2270 | }, |
derat | a55b0115d | 2015-02-03 01:59:08 | [diff] [blame] | 2271 | #if defined(OS_MACOSX) |
| 2272 | { |
| 2273 | "enable-harfbuzz-rendertext", |
| 2274 | IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME, |
| 2275 | IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION, |
| 2276 | kOsMac, |
| 2277 | SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText) |
| 2278 | }, |
| 2279 | #endif // defined(OS_MACOSX) |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2280 | #if defined(OS_CHROMEOS) |
| 2281 | { |
alemate | be310d4a | 2015-02-06 17:28:57 | [diff] [blame] | 2282 | "disable-timezone-tracking", |
| 2283 | IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME, |
| 2284 | IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2285 | kOsCrOS, |
alemate | be310d4a | 2015-02-06 17:28:57 | [diff] [blame] | 2286 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption) |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2287 | }, |
ginkage | 716cae5b | 2015-03-13 09:26:02 | [diff] [blame] | 2288 | { |
| 2289 | "disable-webview-signin-flow", |
| 2290 | IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME, |
| 2291 | IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION, |
| 2292 | kOsCrOS, |
| 2293 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow) |
| 2294 | }, |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2295 | #endif // defined(OS_CHROMEOS) |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2296 | { |
| 2297 | "enable-data-reduction-proxy-lo-fi", |
| 2298 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME, |
| 2299 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION, |
| 2300 | kOsAll, |
| 2301 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2302 | kEnableDataReductionProxyLoFi) |
| 2303 | }, |
kundaji | 0cf4c5c | 2015-03-17 17:35:03 | [diff] [blame] | 2304 | { |
| 2305 | "clear-data-reduction-proxy-data-savings", |
| 2306 | IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME, |
| 2307 | IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION, |
| 2308 | kOsAll, |
| 2309 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2310 | kClearDataReductionProxyDataSavings) |
| 2311 | }, |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2312 | #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2313 | { |
| 2314 | "enable-data-reduction-proxy-bypass-warnings", |
| 2315 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME, |
| 2316 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION, |
| 2317 | kOsAndroid, |
| 2318 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2319 | kEnableDataReductionProxyBypassWarning) |
| 2320 | }, |
| 2321 | #endif |
estark | 4b003b33 | 2015-02-14 01:07:05 | [diff] [blame] | 2322 | { |
| 2323 | "allow-insecure-localhost", |
| 2324 | IDS_ALLOW_INSECURE_LOCALHOST, |
| 2325 | IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION, |
| 2326 | kOsAll, |
| 2327 | SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost) |
| 2328 | }, |
benwells | 2367f430 | 2015-02-16 03:46:51 | [diff] [blame] | 2329 | { |
| 2330 | "bypass-app-banner-engagement-checks", |
| 2331 | IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME, |
| 2332 | IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION, |
| 2333 | kOsAndroid, |
| 2334 | SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks) |
| 2335 | }, |
estade | e7acd2db | 2015-02-19 17:57:09 | [diff] [blame] | 2336 | { |
| 2337 | "use-sync-sandbox", |
| 2338 | IDS_FLAGS_SYNC_SANDBOX_NAME, |
| 2339 | IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION, |
| 2340 | kOsAll, |
| 2341 | SINGLE_VALUE_TYPE_AND_VALUE( |
| 2342 | switches::kSyncServiceURL, |
| 2343 | "https://chrome-sync.sandbox.google.com/chrome-sync/alpha") |
| 2344 | }, |
treib | 5b73268 | 2015-03-10 14:19:19 | [diff] [blame] | 2345 | { |
| 2346 | "enable-child-account-detection", |
| 2347 | IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME, |
| 2348 | IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION, |
| 2349 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 2350 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection, |
| 2351 | switches::kDisableChildAccountDetection) |
| 2352 | }, |
alexst | 24a14a32 | 2015-03-10 21:06:09 | [diff] [blame] | 2353 | #if defined(OS_CHROMEOS) && defined(USE_OZONE) |
| 2354 | { |
| 2355 | "ozone-test-single-overlay-support", |
| 2356 | IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY, |
| 2357 | IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION, |
| 2358 | kOsCrOS, |
| 2359 | SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport) |
| 2360 | }, |
| 2361 | #endif // defined(OS_CHROMEOS) && defined(USE_OZONE) |
amistry | 3f8e83b | 2015-03-13 07:31:51 | [diff] [blame] | 2362 | { |
| 2363 | "v8-pac-mojo-out-of-process", |
| 2364 | IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME, |
| 2365 | IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION, |
| 2366 | kOsDesktop, |
| 2367 | SINGLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess), |
| 2368 | }, |
reillyg | bed8fdc | 2015-03-13 19:41:44 | [diff] [blame] | 2369 | #if defined(OS_CHROMEOS) |
| 2370 | { |
| 2371 | "enable-firewall-hole-punching", |
| 2372 | IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_NAME, |
| 2373 | IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_DESCRIPTION, |
| 2374 | kOsCrOS, |
| 2375 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirewallHolePunching) |
| 2376 | }, |
| 2377 | #endif // defined(OS_CHROMEOS) |
mfoltz | 150bb8b | 2015-04-09 22:30:05 | [diff] [blame] | 2378 | #if defined(ENABLE_MEDIA_ROUTER) |
apacible | 4a0e88b | 2015-03-21 01:13:15 | [diff] [blame] | 2379 | { |
| 2380 | "enable-media-router", |
| 2381 | IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME, |
| 2382 | IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION, |
| 2383 | kOsAll, |
| 2384 | SINGLE_VALUE_TYPE(switches::kEnableMediaRouter) |
estark | 93272ab | 2015-03-25 23:54:01 | [diff] [blame] | 2385 | }, |
mfoltz | 150bb8b | 2015-04-09 22:30:05 | [diff] [blame] | 2386 | #endif // defined(ENABLE_MEDIA_ROUTER) |
yawano | af1ed79 | 2015-04-02 05:48:19 | [diff] [blame] | 2387 | // Since kEnableLauncherSearchProviderApi is not available when app list is |
| 2388 | // disabled, flag guard enable-launcher-search-provider-api. |
| 2389 | #if defined(ENABLE_APP_LIST) |
| 2390 | { |
| 2391 | "enable-launcher-search-provider-api", |
| 2392 | IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API, |
| 2393 | IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API_DESCRIPTION, |
| 2394 | kOsCrOS, |
| 2395 | SINGLE_VALUE_TYPE(app_list::switches::kEnableLauncherSearchProviderApi) |
| 2396 | }, |
| 2397 | #endif // defined(ENABLE_APP_LIST) |
yawano | e6a41b1 | 2015-04-03 07:51:59 | [diff] [blame] | 2398 | #if defined(OS_CHROMEOS) |
| 2399 | { |
| 2400 | "enable-mtp-write-support", |
| 2401 | IDS_FLAG_ENABLE_MTP_WRITE_SUPPORT_NAME, |
| 2402 | IDS_FLAG_ENABLE_MTP_WRITE_SUPPORT_DESCRIPTION, |
| 2403 | kOsCrOS, |
| 2404 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableMtpWriteSupport) |
| 2405 | }, |
| 2406 | #endif // defined(OS_CHROMEOS) |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 2407 | #if defined(OS_CHROMEOS) |
| 2408 | { |
| 2409 | "enable-datasaver-prompt", |
| 2410 | IDS_FLAGS_DATASAVER_PROMPT_NAME, |
| 2411 | IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION, |
| 2412 | kOsCrOS, |
| 2413 | MULTI_VALUE_TYPE(kDataSaverPromptChoices) |
| 2414 | }, |
| 2415 | #endif // defined(OS_CHROMEOS) |
treib | e2082a0e | 2015-04-08 10:15:30 | [diff] [blame] | 2416 | { |
| 2417 | "supervised-user-safesites", |
| 2418 | IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME, |
| 2419 | IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION, |
| 2420 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 2421 | MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices) |
| 2422 | }, |
estade | b5efbab6 | 2015-04-28 18:07:42 | [diff] [blame] | 2423 | #if defined(OS_ANDROID) |
| 2424 | { |
| 2425 | "enable-autofill-keyboard-accessory-view", |
| 2426 | IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME, |
| 2427 | IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION, |
| 2428 | kOsAndroid, |
| 2429 | SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView) |
| 2430 | }, |
| 2431 | #endif // defined(OS_ANDROID) |
dalecurtis | f28f0e5 | 2015-05-01 07:08:25 | [diff] [blame] | 2432 | { |
| 2433 | "enable-new-video-renderer", |
| 2434 | IDS_FLAGS_ENABLE_NEW_VIDEO_RENDERER_NAME, |
| 2435 | IDS_FLAGS_ENABLE_NEW_VIDEO_RENDERER_DESCRIPTION, |
| 2436 | kOsAll, |
| 2437 | SINGLE_VALUE_TYPE(switches::kEnableNewVideoRenderer) |
| 2438 | }, |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2439 | // NOTE: Adding new command-line switches requires adding corresponding |
| 2440 | // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2441 | // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 2442 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2443 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2444 | const Experiment* experiments = kExperiments; |
| 2445 | size_t num_experiments = arraysize(kExperiments); |
| 2446 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2447 | // Stores and encapsulates the little state that about:flags has. |
| 2448 | class FlagsState { |
| 2449 | public: |
| 2450 | FlagsState() : needs_restart_(false) {} |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2451 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2452 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2453 | SentinelsMode sentinels); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2454 | bool IsRestartNeededToCommitChanges(); |
| 2455 | void SetExperimentEnabled( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2456 | FlagsStorage* flags_storage, |
| 2457 | const std::string& internal_name, |
| 2458 | bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2459 | void RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2460 | std::map<std::string, base::CommandLine::StringType>* switch_list); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2461 | void ResetAllFlags(FlagsStorage* flags_storage); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2462 | void reset(); |
| 2463 | |
| 2464 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2465 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2466 | return Singleton<FlagsState>::get(); |
| 2467 | } |
| 2468 | |
| 2469 | private: |
| 2470 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2471 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2472 | |
| 2473 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 2474 | }; |
| 2475 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2476 | // Adds the internal names for the specified experiment to |names|. |
| 2477 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 2478 | if (e.type == Experiment::SINGLE_VALUE) { |
| 2479 | names->insert(e.internal_name); |
| 2480 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2481 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 2482 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2483 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2484 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2485 | } |
| 2486 | } |
| 2487 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2488 | // Confirms that an experiment is valid, used in a DCHECK in |
| 2489 | // SanitizeList below. |
| 2490 | bool ValidateExperiment(const Experiment& e) { |
| 2491 | switch (e.type) { |
| 2492 | case Experiment::SINGLE_VALUE: |
| 2493 | DCHECK_EQ(0, e.num_choices); |
| 2494 | DCHECK(!e.choices); |
| 2495 | break; |
| 2496 | case Experiment::MULTI_VALUE: |
| 2497 | DCHECK_GT(e.num_choices, 0); |
| 2498 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2499 | DCHECK(e.choices[0].command_line_switch); |
| 2500 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2501 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2502 | case Experiment::ENABLE_DISABLE_VALUE: |
| 2503 | DCHECK_EQ(3, e.num_choices); |
| 2504 | DCHECK(!e.choices); |
| 2505 | DCHECK(e.command_line_switch); |
| 2506 | DCHECK(e.command_line_value); |
| 2507 | DCHECK(e.disable_command_line_switch); |
| 2508 | DCHECK(e.disable_command_line_value); |
| 2509 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2510 | default: |
| 2511 | NOTREACHED(); |
| 2512 | } |
| 2513 | return true; |
| 2514 | } |
| 2515 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2516 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 2517 | // unknown, to prevent this list to become very long as experiments are added |
| 2518 | // and removed. |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2519 | void SanitizeList(FlagsStorage* flags_storage) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2520 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2521 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2522 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2523 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2524 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2525 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2526 | std::set<std::string> enabled_experiments = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2527 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2528 | std::set<std::string> new_enabled_experiments = |
| 2529 | base::STLSetIntersection<std::set<std::string> >( |
| 2530 | known_experiments, enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2531 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2532 | if (new_enabled_experiments != enabled_experiments) |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2533 | flags_storage->SetFlags(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2534 | } |
| 2535 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2536 | void GetSanitizedEnabledFlags( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2537 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2538 | SanitizeList(flags_storage); |
| 2539 | *result = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2540 | } |
| 2541 | |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2542 | bool SkipConditionalExperiment(const Experiment& experiment, |
| 2543 | FlagsStorage* flags_storage) { |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2544 | #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2545 | chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 2546 | #endif |
| 2547 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2548 | #if defined(OS_ANDROID) |
bolian | 44ee3baf | 2014-10-01 02:41:54 | [diff] [blame] | 2549 | // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel. |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2550 | if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2551 | channel != chrome::VersionInfo::CHANNEL_BETA && |
| 2552 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2553 | return true; |
| 2554 | } |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 2555 | // enable-data-reduction-proxy-alt is only available for the Dev channel. |
| 2556 | if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2557 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 2558 | return true; |
| 2559 | } |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2560 | // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and |
| 2561 | // the Canary/Dev channel. |
| 2562 | if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2563 | channel != chrome::VersionInfo::CHANNEL_DEV && |
| 2564 | channel != chrome::VersionInfo::CHANNEL_CANARY && |
| 2565 | channel != chrome::VersionInfo::CHANNEL_UNKNOWN) { |
| 2566 | return true; |
| 2567 | } |
| 2568 | #endif |
| 2569 | |
| 2570 | #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2571 | // enable-data-reduction-proxy-bypass-warning is only available for Chromium |
| 2572 | // builds and Canary/Dev channel. |
| 2573 | if (!strcmp("enable-data-reduction-proxy-bypass-warnings", |
| 2574 | experiment.internal_name) && |
| 2575 | channel != chrome::VersionInfo::CHANNEL_UNKNOWN && |
| 2576 | channel != chrome::VersionInfo::CHANNEL_CANARY && |
| 2577 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2578 | return true; |
| 2579 | } |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2580 | #endif |
| 2581 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2582 | return false; |
| 2583 | } |
| 2584 | |
| 2585 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2586 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 2587 | // enabled on the current platform. |
| 2588 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2589 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2590 | GetSanitizedEnabledFlags(flags_storage, result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2591 | |
| 2592 | // Filter out any experiments that aren't enabled on the current platform. We |
| 2593 | // don't remove these from prefs else syncing to a platform with a different |
| 2594 | // set of experiments would be lossy. |
| 2595 | std::set<std::string> platform_experiments; |
| 2596 | int current_platform = GetCurrentPlatform(); |
| 2597 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2598 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2599 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 2600 | #if defined(OS_CHROMEOS) |
| 2601 | if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| 2602 | AddInternalName(experiments[i], &platform_experiments); |
| 2603 | #endif |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2604 | } |
| 2605 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2606 | std::set<std::string> new_enabled_experiments = |
| 2607 | base::STLSetIntersection<std::set<std::string> >( |
| 2608 | platform_experiments, *result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2609 | |
| 2610 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2611 | } |
| 2612 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2613 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2614 | base::Value* CreateChoiceData( |
| 2615 | const Experiment& experiment, |
| 2616 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2617 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 2618 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2619 | base::ListValue* result = new base::ListValue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2620 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2621 | base::DictionaryValue* value = new base::DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2622 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2623 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2624 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2625 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2626 | result->Append(value); |
| 2627 | } |
| 2628 | return result; |
| 2629 | } |
| 2630 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2631 | } // namespace |
| 2632 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2633 | std::string Experiment::NameForChoice(int index) const { |
| 2634 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2635 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2636 | DCHECK_LT(index, num_choices); |
| 2637 | return std::string(internal_name) + testing::kMultiSeparator + |
| 2638 | base::IntToString(index); |
| 2639 | } |
| 2640 | |
[email protected] | 9692015 | 2013-12-04 21:00:16 | [diff] [blame] | 2641 | base::string16 Experiment::DescriptionForChoice(int index) const { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2642 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2643 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2644 | DCHECK_LT(index, num_choices); |
| 2645 | int description_id; |
| 2646 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 2647 | const int kEnableDisableDescriptionIds[] = { |
| 2648 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 2649 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 2650 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 2651 | }; |
| 2652 | description_id = kEnableDisableDescriptionIds[index]; |
| 2653 | } else { |
| 2654 | description_id = choices[index].description_id; |
| 2655 | } |
| 2656 | return l10n_util::GetStringUTF16(description_id); |
| 2657 | } |
| 2658 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2659 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2660 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2661 | SentinelsMode sentinels) { |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2662 | FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2663 | command_line, |
| 2664 | sentinels); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2665 | } |
| 2666 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2667 | bool AreSwitchesIdenticalToCurrentCommandLine( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2668 | const base::CommandLine& new_cmdline, |
| 2669 | const base::CommandLine& active_cmdline, |
| 2670 | std::set<base::CommandLine::StringType>* out_difference) { |
| 2671 | std::set<base::CommandLine::StringType> new_flags = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2672 | ExtractFlagsFromCommandLine(new_cmdline); |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2673 | std::set<base::CommandLine::StringType> active_flags = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2674 | ExtractFlagsFromCommandLine(active_cmdline); |
| 2675 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2676 | bool result = false; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2677 | // Needed because std::equal doesn't check if the 2nd set is empty. |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2678 | if (new_flags.size() == active_flags.size()) { |
| 2679 | result = |
| 2680 | std::equal(new_flags.begin(), new_flags.end(), active_flags.begin()); |
| 2681 | } |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2682 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2683 | if (out_difference && !result) { |
| 2684 | std::set_symmetric_difference( |
| 2685 | new_flags.begin(), |
| 2686 | new_flags.end(), |
| 2687 | active_flags.begin(), |
| 2688 | active_flags.end(), |
| 2689 | std::inserter(*out_difference, out_difference->begin())); |
| 2690 | } |
| 2691 | |
| 2692 | return result; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2693 | } |
| 2694 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2695 | void GetFlagsExperimentsData(FlagsStorage* flags_storage, |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2696 | FlagAccess access, |
| 2697 | base::ListValue* supported_experiments, |
| 2698 | base::ListValue* unsupported_experiments) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2699 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2700 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2701 | |
| 2702 | int current_platform = GetCurrentPlatform(); |
| 2703 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2704 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2705 | const Experiment& experiment = experiments[i]; |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2706 | if (SkipConditionalExperiment(experiment, flags_storage)) |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2707 | continue; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2708 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2709 | base::DictionaryValue* data = new base::DictionaryValue(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2710 | data->SetString("internal_name", experiment.internal_name); |
| 2711 | data->SetString("name", |
| 2712 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 2713 | data->SetString("description", |
| 2714 | l10n_util::GetStringUTF16( |
| 2715 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2716 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2717 | base::ListValue* supported_platforms = new base::ListValue(); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2718 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 2719 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2720 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2721 | switch (experiment.type) { |
| 2722 | case Experiment::SINGLE_VALUE: |
| 2723 | data->SetBoolean( |
| 2724 | "enabled", |
| 2725 | enabled_experiments.count(experiment.internal_name) > 0); |
| 2726 | break; |
| 2727 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2728 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2729 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 2730 | break; |
| 2731 | default: |
| 2732 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2733 | } |
| 2734 | |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2735 | bool supported = (experiment.supported_platforms & current_platform) != 0; |
| 2736 | #if defined(OS_CHROMEOS) |
| 2737 | if (access == kOwnerAccessToFlags && |
| 2738 | (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2739 | supported = true; |
| 2740 | } |
| 2741 | #endif |
| 2742 | if (supported) |
| 2743 | supported_experiments->Append(data); |
| 2744 | else |
| 2745 | unsupported_experiments->Append(data); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2746 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2747 | } |
| 2748 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2749 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2750 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2751 | } |
| 2752 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2753 | void SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2754 | const std::string& internal_name, |
| 2755 | bool enable) { |
| 2756 | FlagsState::GetInstance()->SetExperimentEnabled(flags_storage, |
| 2757 | internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2758 | } |
| 2759 | |
| 2760 | void RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2761 | std::map<std::string, base::CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2762 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2763 | } |
| 2764 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2765 | void ResetAllFlags(FlagsStorage* flags_storage) { |
| 2766 | FlagsState::GetInstance()->ResetAllFlags(flags_storage); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2767 | } |
| 2768 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2769 | int GetCurrentPlatform() { |
| 2770 | #if defined(OS_MACOSX) |
| 2771 | return kOsMac; |
| 2772 | #elif defined(OS_WIN) |
| 2773 | return kOsWin; |
| 2774 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 2775 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 2776 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2777 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 2778 | #elif defined(OS_ANDROID) |
| 2779 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2780 | #else |
| 2781 | #error Unknown platform |
| 2782 | #endif |
| 2783 | } |
| 2784 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2785 | void RecordUMAStatistics(FlagsStorage* flags_storage) { |
| 2786 | std::set<std::string> flags = flags_storage->GetFlags(); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2787 | for (const std::string& flag : flags) { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2788 | std::string action("AboutFlags_"); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2789 | action += flag; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2790 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2791 | } |
| 2792 | // Since flag metrics are recorded every startup, add a tick so that the |
| 2793 | // stats can be made meaningful. |
| 2794 | if (flags.size()) |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2795 | content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick")); |
| 2796 | content::RecordAction(base::UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2797 | } |
| 2798 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 2799 | base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) { |
| 2800 | return static_cast<base::HistogramBase::Sample>( |
| 2801 | metrics::HashMetricName(switch_name)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2802 | } |
| 2803 | |
| 2804 | void ReportCustomFlags(const std::string& uma_histogram_hame, |
| 2805 | const std::set<std::string>& command_line_difference) { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2806 | for (const std::string& flag : command_line_difference) { |
| 2807 | int uma_id = about_flags::testing::kBadSwitchFormatHistogramId; |
| 2808 | if (StartsWithASCII(flag, "--", true /* case_sensitive */)) { |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2809 | // Skip '--' before switch name. |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2810 | std::string switch_name(flag.substr(2)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2811 | |
| 2812 | // Kill value, if any. |
| 2813 | const size_t value_pos = switch_name.find('='); |
| 2814 | if (value_pos != std::string::npos) |
| 2815 | switch_name.resize(value_pos); |
| 2816 | |
| 2817 | uma_id = GetSwitchUMAId(switch_name); |
| 2818 | } else { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2819 | NOTREACHED() << "ReportCustomFlags(): flag '" << flag |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2820 | << "' has incorrect format."; |
| 2821 | } |
| 2822 | DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2823 | << "' '" << flag << "', uma_id=" << uma_id; |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2824 | |
| 2825 | // Sparse histogram macro does not cache the histogram, so it's safe |
| 2826 | // to use macro with non-static histogram name here. |
| 2827 | UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id); |
| 2828 | } |
| 2829 | } |
| 2830 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2831 | ////////////////////////////////////////////////////////////////////////////// |
| 2832 | // FlagsState implementation. |
| 2833 | |
| 2834 | namespace { |
| 2835 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2836 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 2837 | NameToSwitchAndValueMap; |
| 2838 | |
| 2839 | void SetFlagToSwitchMapping(const std::string& key, |
| 2840 | const std::string& switch_name, |
| 2841 | const std::string& switch_value, |
| 2842 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 2843 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 2844 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 2845 | } |
| 2846 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2847 | void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2848 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2849 | SentinelsMode sentinels) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2850 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2851 | return; |
| 2852 | |
| 2853 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 2854 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2855 | GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, |
| 2856 | &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2857 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2858 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2859 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2860 | const Experiment& e = experiments[i]; |
| 2861 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2862 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 2863 | e.command_line_value, &name_to_switch_map); |
| 2864 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 2865 | for (int j = 0; j < e.num_choices; ++j) { |
| 2866 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 2867 | e.choices[j].command_line_switch, |
| 2868 | e.choices[j].command_line_value, |
| 2869 | &name_to_switch_map); |
| 2870 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2871 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2872 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 2873 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 2874 | &name_to_switch_map); |
| 2875 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 2876 | e.command_line_value, &name_to_switch_map); |
| 2877 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 2878 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2879 | } |
| 2880 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2881 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2882 | if (sentinels == kAddSentinels) { |
| 2883 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
| 2884 | flags_switches_.insert( |
| 2885 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 2886 | std::string())); |
| 2887 | } |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2888 | for (const std::string& experiment_name : enabled_experiments) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2889 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2890 | name_to_switch_map.find(experiment_name); |
| 2891 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 2892 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2893 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2894 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2895 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2896 | const std::pair<std::string, std::string>& |
| 2897 | switch_and_value_pair = name_to_switch_it->second; |
| 2898 | |
[email protected] | 9737b363 | 2013-08-26 09:23:23 | [diff] [blame] | 2899 | CHECK(!switch_and_value_pair.first.empty()); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2900 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 2901 | switch_and_value_pair.second); |
| 2902 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2903 | } |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2904 | if (sentinels == kAddSentinels) { |
| 2905 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
| 2906 | flags_switches_.insert( |
| 2907 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 2908 | std::string())); |
| 2909 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2910 | } |
| 2911 | |
| 2912 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 2913 | return needs_restart_; |
| 2914 | } |
| 2915 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2916 | void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2917 | const std::string& internal_name, |
| 2918 | bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2919 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2920 | if (at_index != std::string::npos) { |
| 2921 | DCHECK(enable); |
| 2922 | // We're being asked to enable a multi-choice experiment. Disable the |
| 2923 | // currently selected choice. |
| 2924 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2925 | const std::string experiment_name = internal_name.substr(0, at_index); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2926 | SetExperimentEnabled(flags_storage, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2927 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2928 | // And enable the new choice, if it is not the default first choice. |
| 2929 | if (internal_name != experiment_name + "@0") { |
| 2930 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2931 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2932 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2933 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2934 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2935 | return; |
| 2936 | } |
| 2937 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2938 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2939 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2940 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2941 | const Experiment* e = NULL; |
| 2942 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2943 | if (experiments[i].internal_name == internal_name) { |
| 2944 | e = experiments + i; |
| 2945 | break; |
| 2946 | } |
| 2947 | } |
| 2948 | DCHECK(e); |
| 2949 | |
| 2950 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2951 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2952 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2953 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2954 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2955 | } else { |
| 2956 | if (enable) { |
| 2957 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2958 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2959 | } else { |
| 2960 | // Find the currently enabled choice and disable it. |
| 2961 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2962 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2963 | if (enabled_experiments.find(choice_name) != |
| 2964 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2965 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2966 | enabled_experiments.erase(choice_name); |
| 2967 | // Continue on just in case there's a bug and more than one |
| 2968 | // experiment for this choice was enabled. |
| 2969 | } |
| 2970 | } |
| 2971 | } |
| 2972 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2973 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2974 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2975 | } |
| 2976 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2977 | void FlagsState::RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2978 | std::map<std::string, base::CommandLine::StringType>* switch_list) { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2979 | for (const auto& entry : flags_switches_) |
| 2980 | switch_list->erase(entry.first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2981 | } |
| 2982 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2983 | void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) { |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2984 | needs_restart_ = true; |
| 2985 | |
| 2986 | std::set<std::string> no_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2987 | flags_storage->SetFlags(no_experiments); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2988 | } |
| 2989 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2990 | void FlagsState::reset() { |
| 2991 | needs_restart_ = false; |
| 2992 | flags_switches_.clear(); |
| 2993 | } |
| 2994 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 2995 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2996 | |
| 2997 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2998 | |
| 2999 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 3000 | // also need to update the html file. |
| 3001 | const char kMultiSeparator[] = "@"; |
| 3002 | |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 3003 | const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3004 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3005 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 3006 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3007 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 3008 | |
| 3009 | void SetExperiments(const Experiment* e, size_t count) { |
| 3010 | if (!e) { |
| 3011 | experiments = kExperiments; |
| 3012 | num_experiments = arraysize(kExperiments); |
| 3013 | } else { |
| 3014 | experiments = e; |
| 3015 | num_experiments = count; |
| 3016 | } |
| 3017 | } |
| 3018 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 3019 | const Experiment* GetExperiments(size_t* count) { |
| 3020 | *count = num_experiments; |
| 3021 | return experiments; |
| 3022 | } |
| 3023 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3024 | } // namespace testing |
| 3025 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 3026 | } // namespace about_flags |