[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] | 1fd1f29 | 2013-03-23 23:08:40 | [diff] [blame] | 7 | #include <string.h> |
| 8 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 9 | #include <algorithm> |
| 10 | #include <iterator> |
| 11 | #include <map> |
| 12 | #include <set> |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 13 | #include <utility> |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 14 | |
[email protected] | 7d1d209 | 2013-03-04 04:12:43 | [diff] [blame] | 15 | #include "apps/switches.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 16 | #include "base/command_line.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 17 | #include "base/memory/singleton.h" |
[email protected] | 3853a4c | 2013-02-11 17:15:57 | [diff] [blame] | 18 | #include "base/prefs/pref_service.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 19 | #include "base/strings/string_number_conversions.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 20 | #include "base/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 21 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 22 | #include "cc/base/switches.h" |
[email protected] | 1bc7842 | 2011-03-31 08:41:38 | [diff] [blame] | 23 | #include "chrome/browser/prefs/scoped_user_pref_update.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 24 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 25 | #include "chrome/common/chrome_switches.h" |
[email protected] | 1fd1f29 | 2013-03-23 23:08:40 | [diff] [blame] | 26 | #include "chrome/common/chrome_version_info.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 27 | #include "chrome/common/pref_names.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 28 | #include "content/public/browser/user_metrics.h" |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 29 | #include "grit/chromium_strings.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 30 | #include "grit/generated_resources.h" |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 31 | #include "grit/google_chrome_strings.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 32 | #include "media/base/media_switches.h" |
[email protected] | 0bc6c27 | 2012-07-17 03:32:03 | [diff] [blame] | 33 | #include "ui/app_list/app_list_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 34 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 35 | #include "ui/base/ui_base_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 36 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 37 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 38 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 39 | #include "ui/surface/surface_switches.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 40 | |
[email protected] | f1c3924 | 2013-01-29 16:13:01 | [diff] [blame] | 41 | #if defined(ENABLE_MESSAGE_CENTER) |
| 42 | #include "ui/message_center/message_center_switches.h" |
| 43 | #endif |
| 44 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 45 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 46 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 47 | #endif |
| 48 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 49 | #if defined(OS_CHROMEOS) |
| 50 | #include "chromeos/chromeos_switches.h" |
| 51 | #endif |
| 52 | |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 53 | using content::UserMetricsAction; |
| 54 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 55 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 56 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 57 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 58 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 59 | Experiment::SINGLE_VALUE, \ |
| 60 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 61 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 62 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 63 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 64 | disable_switch, disable_value) \ |
| 65 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 66 | disable_switch, disable_value, NULL, 3 |
| 67 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 68 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 69 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 70 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 71 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 72 | namespace { |
| 73 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 74 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 75 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 76 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 77 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 78 | // whether the experiment is available on that platform. |
| 79 | void AddOsStrings(unsigned bitmask, ListValue* list) { |
| 80 | struct { |
| 81 | unsigned bit; |
| 82 | const char* const name; |
| 83 | } kBitsToOs[] = { |
| 84 | {kOsMac, "Mac"}, |
| 85 | {kOsWin, "Windows"}, |
| 86 | {kOsLinux, "Linux"}, |
| 87 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 88 | {kOsAndroid, "Android"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 89 | }; |
| 90 | for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
| 91 | if (bitmask & kBitsToOs[i].bit) |
| 92 | list->Append(new StringValue(kBitsToOs[i].name)); |
| 93 | } |
| 94 | |
[email protected] | 6831780 | 2012-06-07 19:13:23 | [diff] [blame] | 95 | const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = { |
| 96 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" }, |
| 97 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED, |
| 98 | switches::kOmniboxHistoryQuickProviderNewScoring, |
| 99 | switches::kOmniboxHistoryQuickProviderNewScoringEnabled }, |
| 100 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED, |
| 101 | switches::kOmniboxHistoryQuickProviderNewScoring, |
| 102 | switches::kOmniboxHistoryQuickProviderNewScoringDisabled } |
| 103 | }; |
| 104 | |
[email protected] | 128dc6c | 2012-06-22 20:30:35 | [diff] [blame] | 105 | const Experiment::Choice |
| 106 | kOmniboxHistoryQuickProviderReorderForInliningChoices[] = { |
| 107 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC, |
| 108 | "", |
| 109 | "" }, |
| 110 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED, |
| 111 | switches::kOmniboxHistoryQuickProviderReorderForInlining, |
| 112 | switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled }, |
| 113 | { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED, |
| 114 | switches::kOmniboxHistoryQuickProviderReorderForInlining, |
| 115 | switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled } |
| 116 | }; |
| 117 | |
[email protected] | 032d5e6c | 2012-02-17 17:53:55 | [diff] [blame] | 118 | const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = { |
| 119 | { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" }, |
| 120 | { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED, |
| 121 | switches::kOmniboxInlineHistoryQuickProvider, |
| 122 | switches::kOmniboxInlineHistoryQuickProviderAllowed }, |
| 123 | { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED, |
| 124 | switches::kOmniboxInlineHistoryQuickProvider, |
| 125 | switches::kOmniboxInlineHistoryQuickProviderProhibited } |
| 126 | }; |
| 127 | |
[email protected] | fb85419 | 2013-02-06 01:30:04 | [diff] [blame] | 128 | const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = { |
| 129 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 130 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 131 | switches::kEnableCompositingForFixedPosition, ""}, |
| 132 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 133 | switches::kDisableCompositingForFixedPosition, ""}, |
| 134 | { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI, |
| 135 | switches::kEnableHighDpiCompositingForFixedPosition, ""} |
| 136 | }; |
| 137 | |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 138 | const Experiment::Choice kGDIPresentChoices[] = { |
| 139 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 140 | { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW, |
| 141 | switches::kDoFirstShowPresentWithGDI, ""}, |
| 142 | { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW, |
| 143 | switches::kDoAllShowPresentWithGDI, ""} |
| 144 | }; |
| 145 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 146 | const Experiment::Choice kTouchEventsChoices[] = { |
| 147 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 148 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 149 | switches::kTouchEvents, |
| 150 | switches::kTouchEventsEnabled }, |
| 151 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 152 | switches::kTouchEvents, |
| 153 | switches::kTouchEventsDisabled } |
| 154 | }; |
| 155 | |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 156 | const Experiment::Choice kTouchOptimizedUIChoices[] = { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 157 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
[email protected] | a45c6940 | 2012-06-24 16:32:20 | [diff] [blame] | 158 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 159 | switches::kTouchOptimizedUI, |
| 160 | switches::kTouchOptimizedUIEnabled }, |
[email protected] | a45c6940 | 2012-06-24 16:32:20 | [diff] [blame] | 161 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 162 | switches::kTouchOptimizedUI, |
| 163 | switches::kTouchOptimizedUIDisabled } |
| 164 | }; |
| 165 | |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 166 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
| 167 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 168 | // Secure shell can be used on ChromeOS for forwarding the TCP port opened by |
| 169 | // debug stub to a remote machine. Since secure shell uses NaCl, we provide |
| 170 | // an option to switch off its debugging. |
| 171 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS, |
| 172 | switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" }, |
| 173 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 174 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 175 | }; |
| 176 | |
[email protected] | ea2f334 | 2012-09-21 21:13:36 | [diff] [blame] | 177 | #if defined(OS_CHROMEOS) |
| 178 | const Experiment::Choice kAshBootAnimationFunction[] = { |
| 179 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 180 | { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2, |
| 181 | ash::switches::kAshBootAnimationFunction2, ""}, |
| 182 | { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3, |
| 183 | ash::switches::kAshBootAnimationFunction3, ""} |
| 184 | }; |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 185 | |
| 186 | const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = { |
[email protected] | ad2fe9f | 2012-11-15 11:03:19 | [diff] [blame] | 187 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 188 | { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR, |
[email protected] | ad2fe9f | 2012-11-15 11:03:19 | [diff] [blame] | 189 | switches::kEnableChromeCaptivePortalDetector, ""}, |
| 190 | { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR, |
| 191 | switches::kDisableChromeCaptivePortalDetector, ""} |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 192 | }; |
[email protected] | a78c743 | 2013-03-13 06:22:43 | [diff] [blame] | 193 | |
[email protected] | ea2f334 | 2012-09-21 21:13:36 | [diff] [blame] | 194 | #endif |
| 195 | |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 196 | const Experiment::Choice kImplSidePaintingChoices[] = { |
| 197 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 198 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 199 | cc::switches::kEnableImplSidePainting, ""}, |
| 200 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 201 | cc::switches::kDisableImplSidePainting, ""} |
| 202 | }; |
| 203 | |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 204 | const Experiment::Choice kMaxPrepaintTileDistanceChoices[] = { |
| 205 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 206 | { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_SHORT, |
| 207 | cc::switches::kMaxPrepaintTileDistance, "2048"}, |
| 208 | { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_TALL, |
| 209 | cc::switches::kMaxPrepaintTileDistance, "4096"}, |
| 210 | { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_GRANDE, |
| 211 | cc::switches::kMaxPrepaintTileDistance, "8192"}, |
| 212 | { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_VENTI, |
| 213 | cc::switches::kMaxPrepaintTileDistance, "16384"} |
| 214 | }; |
| 215 | |
| 216 | const Experiment::Choice kMaxTilesForInterestAreaChoices[] = { |
| 217 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 218 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 219 | cc::switches::kMaxTilesForInterestArea, "64"}, |
| 220 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 221 | cc::switches::kMaxTilesForInterestArea, "128"}, |
| 222 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 223 | cc::switches::kMaxTilesForInterestArea, "256"}, |
| 224 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 225 | cc::switches::kMaxTilesForInterestArea, "512"} |
| 226 | }; |
| 227 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame^] | 228 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
| 229 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", "off" }, |
| 230 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 231 | switches::kUseSimpleCacheBackend, "on"} |
| 232 | }; |
| 233 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 234 | // RECORDING USER METRICS FOR FLAGS: |
| 235 | // ----------------------------------------------------------------------------- |
| 236 | // The first line of the experiment is the internal name. If you'd like to |
| 237 | // gather statistics about the usage of your flag, you should append a marker |
| 238 | // comment to the end of the feature name, like so: |
| 239 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 240 | // |
| 241 | // After doing that, run //chrome/tools/extract_actions.py (see instructions at |
| 242 | // the top of that file for details) to update the chromeactions.txt file, which |
| 243 | // will enable UMA to record your feature flag. |
| 244 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 245 | // After your feature has shipped under a flag, you can locate the metrics under |
| 246 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 247 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 248 | // get a sense of usage. Note that this will not be the same as number of users |
| 249 | // with a given feature enabled because users can quit and relaunch the |
| 250 | // application multiple times over a given time interval. The dashboard also |
| 251 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 252 | // last seven days. However, note that this is not the same as the number of |
| 253 | // users who have the flag enabled, since enabling the flag happens once, |
| 254 | // whereas running with the flag enabled happens until the user flips the flag |
| 255 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 256 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 257 | // To add a new experiment add to the end of kExperiments. There are two |
| 258 | // distinct types of experiments: |
| 259 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 260 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 261 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 262 | // deactivated state for this lab (i.e. no command line option). To specify |
| 263 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 264 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 265 | // See the documentation of Experiment for details on the fields. |
| 266 | // |
| 267 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 268 | const Experiment kExperiments[] = { |
[email protected] | 270f034 | 2013-02-20 01:19:44 | [diff] [blame] | 269 | #if defined(OS_ANDROID) |
| 270 | { |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 271 | "enable-spdy-proxy-auth", |
| 272 | IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME, |
| 273 | IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION, |
[email protected] | 270f034 | 2013-02-20 01:19:44 | [diff] [blame] | 274 | kOsAndroid, |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 275 | SINGLE_VALUE_TYPE(switches::kEnableSpdyProxyAuth) |
[email protected] | 270f034 | 2013-02-20 01:19:44 | [diff] [blame] | 276 | }, |
| 277 | #endif |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 278 | { |
[email protected] | aac169d | 2011-03-18 19:53:03 | [diff] [blame] | 279 | "expose-for-tabs", // FLAGS:RECORD_UMA |
| 280 | IDS_FLAGS_TABPOSE_NAME, |
| 281 | IDS_FLAGS_TABPOSE_DESCRIPTION, |
| 282 | kOsMac, |
| 283 | #if defined(OS_MACOSX) |
| 284 | // The switch exists only on OS X. |
| 285 | SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs) |
| 286 | #else |
| 287 | SINGLE_VALUE_TYPE("") |
| 288 | #endif |
| 289 | }, |
| 290 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 291 | "conflicting-modules-check", // FLAGS:RECORD_UMA |
[email protected] | c1bbaa8 | 2010-11-08 11:17:05 | [diff] [blame] | 292 | IDS_FLAGS_CONFLICTS_CHECK_NAME, |
| 293 | IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION, |
| 294 | kOsWin, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 295 | SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck) |
[email protected] | c1bbaa8 | 2010-11-08 11:17:05 | [diff] [blame] | 296 | }, |
| 297 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 298 | "cloud-print-proxy", // FLAGS:RECORD_UMA |
[email protected] | dae7325b | 2011-12-21 20:56:54 | [diff] [blame] | 299 | IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME, |
| 300 | IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION, |
[email protected] | 9f8872b3 | 2011-03-04 19:44:45 | [diff] [blame] | 301 | // For a Chrome build, we know we have a PDF plug-in on Windows, so it's |
[email protected] | 4fa24bf | 2011-08-20 02:15:22 | [diff] [blame] | 302 | // fully enabled. |
[email protected] | 5d10d57d | 2011-07-22 22:16:31 | [diff] [blame] | 303 | // Otherwise, where we know Windows could be working if a viable PDF |
[email protected] | 4fa24bf | 2011-08-20 02:15:22 | [diff] [blame] | 304 | // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux |
| 305 | // always have PDF rasterization available, so no flag needed there. |
| 306 | #if !defined(GOOGLE_CHROME_BUILD) |
| 307 | kOsWin, |
| 308 | #else |
| 309 | 0, |
[email protected] | fa6d2a2f | 2010-11-30 21:47:19 | [diff] [blame] | 310 | #endif |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 311 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy) |
[email protected] | 8b6588a | 2010-10-12 02:39:42 | [diff] [blame] | 312 | }, |
[email protected] | 60d77bd | 2012-08-22 00:10:07 | [diff] [blame] | 313 | #if defined(OS_WIN) |
| 314 | { |
| 315 | "print-raster", |
| 316 | IDS_FLAGS_PRINT_RASTER_NAME, |
| 317 | IDS_FLAGS_PRINT_RASTER_DESCRIPTION, |
| 318 | kOsWin, |
| 319 | SINGLE_VALUE_TYPE(switches::kPrintRaster) |
| 320 | }, |
| 321 | #endif // OS_WIN |
[email protected] | 0209b44 | 2012-07-18 00:38:05 | [diff] [blame] | 322 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 323 | "ignore-gpu-blacklist", |
| 324 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 325 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 326 | kOsAll, |
| 327 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 328 | }, |
| 329 | { |
[email protected] | 0110cf11 | 2011-07-02 00:39:43 | [diff] [blame] | 330 | "force-compositing-mode-2", |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 331 | IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME, |
| 332 | IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION, |
[email protected] | 9b19cf8 | 2012-06-13 06:23:23 | [diff] [blame] | 333 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 334 | ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode, |
| 335 | switches::kDisableForceCompositingMode) |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 336 | }, |
| 337 | { |
[email protected] | 72787e39 | 2012-03-23 05:55:43 | [diff] [blame] | 338 | "threaded-compositing-mode", |
| 339 | IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME, |
| 340 | IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 341 | kOsDesktop & ~kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 342 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing, |
| 343 | switches::kDisableThreadedCompositing) |
[email protected] | 644a107 | 2012-03-16 09:29:59 | [diff] [blame] | 344 | }, |
| 345 | { |
[email protected] | 17e2769 | 2013-02-06 17:02:09 | [diff] [blame] | 346 | "force-accelerated-composited-scrolling", |
| 347 | IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME, |
| 348 | IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION, |
| 349 | kOsAll, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 350 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll, |
| 351 | switches::kDisableAcceleratedOverflowScroll) |
[email protected] | 17e2769 | 2013-02-06 17:02:09 | [diff] [blame] | 352 | }, |
| 353 | { |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 354 | "present-with-GDI", |
| 355 | IDS_FLAGS_PRESENT_WITH_GDI_NAME, |
| 356 | IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION, |
| 357 | kOsWin, |
| 358 | MULTI_VALUE_TYPE(kGDIPresentChoices) |
| 359 | }, |
| 360 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 361 | "disable-accelerated-2d-canvas", |
| 362 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 363 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 364 | kOsAll, |
| 365 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 366 | }, |
| 367 | { |
[email protected] | efcde13 | 2012-05-30 01:05:18 | [diff] [blame] | 368 | "disable-threaded-animation", |
| 369 | IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME, |
| 370 | IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION, |
[email protected] | 644a107 | 2012-03-16 09:29:59 | [diff] [blame] | 371 | kOsAll, |
[email protected] | 65bfd997 | 2012-10-19 03:39:37 | [diff] [blame] | 372 | SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation) |
[email protected] | 644a107 | 2012-03-16 09:29:59 | [diff] [blame] | 373 | }, |
| 374 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 375 | "composited-layer-borders", |
| 376 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 377 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 378 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 379 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 380 | }, |
| 381 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 382 | "show-fps-counter", |
| 383 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 384 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 385 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 386 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 387 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 388 | { |
[email protected] | 70c98a33 | 2011-12-21 20:51:52 | [diff] [blame] | 389 | "accelerated-filters", |
| 390 | IDS_FLAGS_ACCELERATED_FILTERS, |
| 391 | IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION, |
| 392 | kOsAll, |
| 393 | SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters) |
| 394 | }, |
| 395 | { |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 396 | "disable-gpu-vsync", |
| 397 | IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, |
| 398 | IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 399 | kOsDesktop, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 400 | SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) |
| 401 | }, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 402 | { |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 403 | "enable-webgl", |
| 404 | IDS_FLAGS_ENABLE_WEBGL_NAME, |
| 405 | IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION, |
| 406 | kOsAndroid, |
| 407 | #if defined(OS_ANDROID) |
| 408 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL) |
| 409 | #else |
| 410 | SINGLE_VALUE_TYPE("") |
| 411 | #endif |
| 412 | }, |
| 413 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 414 | "disable-webgl", |
| 415 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 416 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 417 | kOsDesktop, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 418 | #if defined(OS_ANDROID) |
| 419 | SINGLE_VALUE_TYPE("") |
| 420 | #else |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 421 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 422 | #endif |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 423 | }, |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 424 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 425 | "disable-webrtc", |
| 426 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 427 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 428 | kOsAndroid, |
| 429 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 430 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 431 | #else |
| 432 | SINGLE_VALUE_TYPE("") |
| 433 | #endif |
| 434 | }, |
| 435 | { |
[email protected] | 96bcdc10 | 2012-05-24 23:42:10 | [diff] [blame] | 436 | "fixed-position-creates-stacking-context", |
| 437 | IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME, |
| 438 | IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION, |
| 439 | kOsAll, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 440 | ENABLE_DISABLE_VALUE_TYPE( |
| 441 | switches::kEnableFixedPositionCreatesStackingContext, |
| 442 | switches::kDisableFixedPositionCreatesStackingContext) |
[email protected] | 96bcdc10 | 2012-05-24 23:42:10 | [diff] [blame] | 443 | }, |
[email protected] | fb85419 | 2013-02-06 01:30:04 | [diff] [blame] | 444 | { |
| 445 | "enable-compositing-for-fixed-position", |
| 446 | IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME, |
| 447 | IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION, |
| 448 | kOsAll, |
| 449 | MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices) |
| 450 | }, |
[email protected] | a7640ef2 | 2012-10-06 00:52:08 | [diff] [blame] | 451 | // TODO(bbudge): When NaCl is on by default, remove this flag entry. |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 452 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 453 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 454 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 455 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 456 | kOsDesktop, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 457 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 458 | }, |
[email protected] | b39c6d9 | 2012-01-31 16:38:41 | [diff] [blame] | 459 | // TODO(halyavin): When exception handling is on by default, replace this |
| 460 | // flag with disable-nacl-exception-handling. |
| 461 | { |
| 462 | "enable-nacl-exception-handling", // FLAGS:RECORD_UMA |
| 463 | IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME, |
| 464 | IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 465 | kOsDesktop, |
[email protected] | b39c6d9 | 2012-01-31 16:38:41 | [diff] [blame] | 466 | SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling) |
| 467 | }, |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 468 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 469 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 470 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 471 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 472 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 473 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 474 | }, |
| 475 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 476 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 477 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 478 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 479 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 480 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 481 | }, |
| 482 | { |
[email protected] | 7babd1c | 2012-08-08 20:35:29 | [diff] [blame] | 483 | "enable-pnacl", // FLAGS:RECORD_UMA |
| 484 | IDS_FLAGS_ENABLE_PNACL_NAME, |
| 485 | IDS_FLAGS_ENABLE_PNACL_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 486 | kOsDesktop, |
[email protected] | 7babd1c | 2012-08-08 20:35:29 | [diff] [blame] | 487 | SINGLE_VALUE_TYPE(switches::kEnablePnacl) |
| 488 | }, |
| 489 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 490 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 491 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 492 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 493 | kOsDesktop, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 494 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 495 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 496 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 497 | "extensions-on-chrome-urls", |
| 498 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 499 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 500 | kOsAll, |
| 501 | SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs) |
| 502 | }, |
| 503 | { |
[email protected] | e9cddd5 | 2013-03-23 17:37:53 | [diff] [blame] | 504 | "enable-adview", |
| 505 | IDS_FLAGS_ENABLE_ADVIEW_NAME, |
| 506 | IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION, |
| 507 | kOsDesktop, |
| 508 | SINGLE_VALUE_TYPE(switches::kEnableAdview) |
| 509 | }, |
| 510 | { |
| 511 | "enable-adview-src-attribute", |
| 512 | IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME, |
| 513 | IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION, |
| 514 | kOsDesktop, |
| 515 | SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute) |
| 516 | }, |
| 517 | { |
[email protected] | 544471a | 2012-10-13 05:27:09 | [diff] [blame] | 518 | "action-box", |
[email protected] | cab18ef | 2012-04-27 07:22:03 | [diff] [blame] | 519 | IDS_FLAGS_ACTION_BOX_NAME, |
| 520 | IDS_FLAGS_ACTION_BOX_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 521 | kOsDesktop, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 522 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1", |
| 523 | switches::kActionBox, "0") |
[email protected] | cab18ef | 2012-04-27 07:22:03 | [diff] [blame] | 524 | }, |
| 525 | { |
[email protected] | 3a36243 | 2012-06-18 20:39:51 | [diff] [blame] | 526 | "script-badges", |
| 527 | IDS_FLAGS_SCRIPT_BADGES_NAME, |
| 528 | IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 529 | kOsDesktop, |
[email protected] | 544471a | 2012-10-13 05:27:09 | [diff] [blame] | 530 | SINGLE_VALUE_TYPE(switches::kScriptBadges) |
| 531 | }, |
| 532 | { |
| 533 | "script-bubble", |
| 534 | IDS_FLAGS_SCRIPT_BUBBLE_NAME, |
| 535 | IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 536 | kOsDesktop, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 537 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1", |
| 538 | switches::kScriptBubble, "0") |
[email protected] | 3a36243 | 2012-06-18 20:39:51 | [diff] [blame] | 539 | }, |
| 540 | { |
[email protected] | cbe224d | 2011-08-04 22:12:49 | [diff] [blame] | 541 | "apps-new-install-bubble", |
| 542 | IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME, |
| 543 | IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 544 | kOsDesktop, |
[email protected] | cbe224d | 2011-08-04 22:12:49 | [diff] [blame] | 545 | SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble) |
| 546 | }, |
| 547 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 548 | "disable-hyperlink-auditing", |
| 549 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 550 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 551 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 552 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 553 | }, |
| 554 | { |
| 555 | "experimental-location-features", // FLAGS:RECORD_UMA |
| 556 | IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME, |
| 557 | IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION, |
| 558 | kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 559 | SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures) |
| 560 | }, |
| 561 | { |
[email protected] | 5aea186 | 2011-03-23 23:55:39 | [diff] [blame] | 562 | "tab-groups-context-menu", |
| 563 | IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME, |
| 564 | IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION, |
| 565 | kOsWin, |
| 566 | SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu) |
| 567 | }, |
[email protected] | c94cebd | 2012-06-21 00:55:28 | [diff] [blame] | 568 | { |
| 569 | "enable-instant-extended-api", |
| 570 | IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API, |
| 571 | IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 572 | kOsDesktop, |
[email protected] | 7344438 | 2013-02-26 19:31:51 | [diff] [blame] | 573 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI, |
| 574 | switches::kDisableInstantExtendedAPI) |
[email protected] | c94cebd | 2012-06-21 00:55:28 | [diff] [blame] | 575 | }, |
[email protected] | e9bf9d9 | 2011-03-31 20:57:15 | [diff] [blame] | 576 | { |
[email protected] | 354e33b | 2011-06-15 00:29:10 | [diff] [blame] | 577 | "static-ip-config", |
| 578 | IDS_FLAGS_STATIC_IP_CONFIG_NAME, |
| 579 | IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION, |
| 580 | kOsCrOS, |
| 581 | #if defined(OS_CHROMEOS) |
| 582 | // This switch exists only on Chrome OS. |
| 583 | SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig) |
| 584 | #else |
| 585 | SINGLE_VALUE_TYPE("") |
| 586 | #endif |
| 587 | }, |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 588 | { |
| 589 | "show-autofill-type-predictions", |
| 590 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 591 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 592 | kOsAll, |
| 593 | SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions) |
| 594 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 595 | { |
[email protected] | a5e9faa | 2013-03-19 09:58:38 | [diff] [blame] | 596 | "enable-sync-favicons", |
| 597 | IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME, |
| 598 | IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION, |
[email protected] | fdf4e25 | 2012-04-27 00:26:55 | [diff] [blame] | 599 | kOsAll, |
[email protected] | a5e9faa | 2013-03-19 09:58:38 | [diff] [blame] | 600 | SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons) |
[email protected] | fdf4e25 | 2012-04-27 00:26:55 | [diff] [blame] | 601 | }, |
| 602 | { |
[email protected] | 5d90a0a | 2012-11-15 02:43:40 | [diff] [blame] | 603 | "sync-keystore-encryption", |
| 604 | IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME, |
| 605 | IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION, |
| 606 | kOsAll, |
| 607 | SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption) |
| 608 | }, |
| 609 | { |
[email protected] | e755a38 | 2012-09-13 17:16:35 | [diff] [blame] | 610 | "enable-gesture-tap-highlight", |
| 611 | IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME, |
| 612 | IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION, |
| 613 | kOsLinux | kOsCrOS, |
[email protected] | 06ca05d | 2013-03-13 19:12:47 | [diff] [blame] | 614 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight, |
| 615 | switches::kDisableGestureTapHighlight) |
[email protected] | e755a38 | 2012-09-13 17:16:35 | [diff] [blame] | 616 | }, |
| 617 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 618 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 619 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 620 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 621 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 622 | // On by default for the Mac (different implementation in WebKit). |
[email protected] | 2a5e9d0 | 2013-01-20 01:09:25 | [diff] [blame] | 623 | kOsWin | kOsLinux, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 624 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 625 | }, |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 626 | { |
[email protected] | 6831780 | 2012-06-07 19:13:23 | [diff] [blame] | 627 | "omnibox-history-quick-provider-new-scoring", |
| 628 | IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME, |
| 629 | IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION, |
| 630 | kOsAll, |
| 631 | MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices) |
| 632 | }, |
| 633 | { |
[email protected] | 128dc6c | 2012-06-22 20:30:35 | [diff] [blame] | 634 | "omnibox-history-quick-provider-reorder-for-inlining", |
| 635 | IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME, |
| 636 | IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION, |
| 637 | kOsAll, |
| 638 | MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices) |
| 639 | }, |
| 640 | { |
[email protected] | 032d5e6c | 2012-02-17 17:53:55 | [diff] [blame] | 641 | "omnibox-inline-history-quick-provider", |
| 642 | IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME, |
| 643 | IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION, |
| 644 | kOsAll, |
| 645 | MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices) |
| 646 | }, |
| 647 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 648 | "enable-panels", |
| 649 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 650 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 651 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 652 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 653 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 654 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 655 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 656 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 657 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 658 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 659 | kOsMac | kOsWin | kOsLinux, |
| 660 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 661 | }, |
| 662 | { |
[email protected] | b7bb44f | 2011-09-01 05:17:03 | [diff] [blame] | 663 | "enable-autologin", |
| 664 | IDS_FLAGS_ENABLE_AUTOLOGIN_NAME, |
| 665 | IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION, |
| 666 | kOsMac | kOsWin | kOsLinux, |
| 667 | SINGLE_VALUE_TYPE(switches::kEnableAutologin) |
| 668 | }, |
[email protected] | b984117 | 2011-09-26 23:36:09 | [diff] [blame] | 669 | { |
[email protected] | 14371cb | 2013-03-21 07:46:12 | [diff] [blame] | 670 | "enable-spdy31", |
| 671 | IDS_FLAGS_ENABLE_SPDY31_NAME, |
| 672 | IDS_FLAGS_ENABLE_SPDY31_DESCRIPTION, |
[email protected] | 3231b61 | 2012-03-23 05:57:54 | [diff] [blame] | 673 | kOsAll, |
[email protected] | 14371cb | 2013-03-21 07:46:12 | [diff] [blame] | 674 | SINGLE_VALUE_TYPE(switches::kEnableSpdy31) |
[email protected] | 3231b61 | 2012-03-23 05:57:54 | [diff] [blame] | 675 | }, |
| 676 | { |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 677 | "enable-async-dns", |
| 678 | IDS_FLAGS_ENABLE_ASYNC_DNS_NAME, |
| 679 | IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION, |
[email protected] | 85594c14 | 2012-09-11 18:02:46 | [diff] [blame] | 680 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 681 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns, |
| 682 | switches::kDisableAsyncDns) |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 683 | }, |
| 684 | { |
[email protected] | 1eb9380 | 2012-09-11 18:57:56 | [diff] [blame] | 685 | "disable-media-source", |
[email protected] | da43c08 | 2012-09-07 18:56:11 | [diff] [blame] | 686 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 687 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 688 | kOsAll, |
[email protected] | da43c08 | 2012-09-07 18:56:11 | [diff] [blame] | 689 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 6aa03b3 | 2011-10-27 21:44:44 | [diff] [blame] | 690 | }, |
[email protected] | e4e68dbb | 2011-11-18 01:50:22 | [diff] [blame] | 691 | { |
[email protected] | 36d9841 | 2013-01-31 20:28:53 | [diff] [blame] | 692 | "disable-encrypted-media", |
| 693 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME, |
| 694 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 695 | kOsDesktop, |
[email protected] | 36d9841 | 2013-01-31 20:28:53 | [diff] [blame] | 696 | SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 697 | }, |
[email protected] | f8862879 | 2012-12-18 07:07:50 | [diff] [blame] | 698 | { |
| 699 | "enable-opus-playback", |
| 700 | IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME, |
| 701 | IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 702 | kOsDesktop, |
[email protected] | f8862879 | 2012-12-18 07:07:50 | [diff] [blame] | 703 | SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback) |
| 704 | }, |
[email protected] | ca6eaa5a | 2013-01-24 16:16:04 | [diff] [blame] | 705 | { |
[email protected] | c54e1aa | 2013-01-25 09:26:17 | [diff] [blame] | 706 | "enable-vp9-playback", |
| 707 | IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME, |
| 708 | IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION, |
| 709 | kOsDesktop, |
| 710 | SINGLE_VALUE_TYPE(switches::kEnableVp9Playback) |
| 711 | }, |
| 712 | { |
[email protected] | ca6eaa5a | 2013-01-24 16:16:04 | [diff] [blame] | 713 | "enable-managed-users", |
| 714 | IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME, |
| 715 | IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION, |
| 716 | kOsAll, |
| 717 | SINGLE_VALUE_TYPE(switches::kEnableManagedUsers) |
| 718 | }, |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 719 | #if defined(USE_ASH) |
[email protected] | 8cc10df | 2011-11-03 23:57:50 | [diff] [blame] | 720 | { |
[email protected] | cda278d | 2012-10-30 20:31:40 | [diff] [blame] | 721 | "ash-disable-auto-window-placement", |
| 722 | IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME, |
| 723 | IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION, |
| 724 | kOsWin | kOsLinux | kOsCrOS, |
| 725 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement) |
| 726 | }, |
[email protected] | b4e4ec4 | 2012-11-29 21:42:40 | [diff] [blame] | 727 | { |
[email protected] | 16f55a2 | 2013-02-13 23:47:34 | [diff] [blame] | 728 | "ash-disable-per-app-launcher", |
| 729 | IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME, |
| 730 | IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION, |
[email protected] | b4e4ec4 | 2012-11-29 21:42:40 | [diff] [blame] | 731 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 16f55a2 | 2013-02-13 23:47:34 | [diff] [blame] | 732 | SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher) |
[email protected] | b4e4ec4 | 2012-11-29 21:42:40 | [diff] [blame] | 733 | }, |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 734 | #endif |
[email protected] | eaae8b46 | 2012-01-20 22:20:39 | [diff] [blame] | 735 | { |
[email protected] | db543d32 | 2011-12-15 20:40:15 | [diff] [blame] | 736 | "per-tile-painting", |
| 737 | IDS_FLAGS_PER_TILE_PAINTING_NAME, |
| 738 | IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION, |
[email protected] | a5b1b27 | 2012-01-06 20:44:37 | [diff] [blame] | 739 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 65bfd997 | 2012-10-19 03:39:37 | [diff] [blame] | 740 | SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting) |
[email protected] | db543d32 | 2011-12-15 20:40:15 | [diff] [blame] | 741 | }, |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 742 | { |
| 743 | "enable-javascript-harmony", |
| 744 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 745 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 746 | kOsAll, |
| 747 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony") |
| 748 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 749 | { |
[email protected] | 8564617 | 2012-01-09 22:45:54 | [diff] [blame] | 750 | "enable-tab-browser-dragging", |
| 751 | IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME, |
| 752 | IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION, |
| 753 | kOsWin, |
| 754 | SINGLE_VALUE_TYPE(switches::kTabBrowserDragging) |
| 755 | }, |
| 756 | { |
[email protected] | 068b7b5 | 2012-02-27 12:41:44 | [diff] [blame] | 757 | "disable-restore-session-state", |
| 758 | IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME, |
| 759 | IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 760 | kOsAll, |
[email protected] | 068b7b5 | 2012-02-27 12:41:44 | [diff] [blame] | 761 | SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState) |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 762 | }, |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 763 | { |
| 764 | "disable-software-rasterizer", |
| 765 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 766 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 767 | #if defined(ENABLE_SWIFTSHADER) |
| 768 | kOsAll, |
| 769 | #else |
| 770 | 0, |
| 771 | #endif |
| 772 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 773 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 774 | { |
[email protected] | ff7b6dd | 2012-09-15 20:20:03 | [diff] [blame] | 775 | "enable-experimental-webkit-features", |
| 776 | IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME, |
| 777 | IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 778 | kOsAll, |
[email protected] | ff7b6dd | 2012-09-15 20:20:03 | [diff] [blame] | 779 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 780 | }, |
| 781 | { |
[email protected] | 0f95a25 | 2012-09-13 22:30:04 | [diff] [blame] | 782 | "enable-css-shaders", |
| 783 | IDS_FLAGS_CSS_SHADERS_NAME, |
| 784 | IDS_FLAGS_CSS_SHADERS_DESCRIPTION, |
| 785 | kOsAll, |
| 786 | SINGLE_VALUE_TYPE(switches::kEnableCssShaders) |
| 787 | }, |
| 788 | { |
[email protected] | 9860c68b | 2012-02-02 01:58:09 | [diff] [blame] | 789 | "enable-extension-activity-ui", |
| 790 | IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME, |
| 791 | IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 792 | kOsDesktop, |
[email protected] | 9860c68b | 2012-02-02 01:58:09 | [diff] [blame] | 793 | SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI) |
[email protected] | 8bed69d | 2012-02-02 06:46:00 | [diff] [blame] | 794 | }, |
[email protected] | 54ae4e9 | 2012-02-16 15:19:05 | [diff] [blame] | 795 | { |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 796 | "disable-ntp-other-sessions-menu", |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 797 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME, |
| 798 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 799 | kOsDesktop, |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 800 | SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu) |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 801 | }, |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 802 | #if defined(USE_ASH) |
[email protected] | 31cf1c5 | 2012-02-29 20:55:01 | [diff] [blame] | 803 | { |
[email protected] | 3cd198a2 | 2012-03-12 20:38:01 | [diff] [blame] | 804 | "enable-ash-oak", |
| 805 | IDS_FLAGS_ENABLE_ASH_OAK_NAME, |
| 806 | IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION, |
| 807 | kOsAll, |
| 808 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak), |
| 809 | }, |
[email protected] | 31cf1c5 | 2012-02-29 20:55:01 | [diff] [blame] | 810 | #endif |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 811 | { |
| 812 | "enable-devtools-experiments", |
| 813 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 814 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 815 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 816 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 817 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 818 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 819 | "silent-debugger-extension-api", |
| 820 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 821 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 822 | kOsDesktop, |
| 823 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 824 | }, |
| 825 | { |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 826 | "enable-suggestions-ntp", |
| 827 | IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME, |
| 828 | IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 829 | kOsDesktop, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 830 | SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage) |
| 831 | }, |
[email protected] | a3d5425 | 2012-04-05 20:04:13 | [diff] [blame] | 832 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 833 | "spellcheck-autocorrect", |
| 834 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 835 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 836 | kOsWin | kOsLinux | kOsCrOS, |
| 837 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 838 | }, |
| 839 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 840 | "touch-events", |
| 841 | IDS_TOUCH_EVENTS_NAME, |
| 842 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 843 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 844 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 845 | }, |
| 846 | { |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 847 | "touch-optimized-ui", |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 848 | IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME, |
| 849 | IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION, |
[email protected] | c71fe640 | 2012-08-15 15:22:55 | [diff] [blame] | 850 | kOsWin, |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 851 | MULTI_VALUE_TYPE(kTouchOptimizedUIChoices) |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 852 | }, |
[email protected] | 8a6aaa7 | 2012-04-20 20:53:58 | [diff] [blame] | 853 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 854 | "disable-touch-adjustment", |
| 855 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 856 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
| 857 | kOsWin | kOsLinux | kOsCrOS, |
| 858 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 859 | }, |
| 860 | { |
[email protected] | 0b9383a | 2012-10-26 00:58:16 | [diff] [blame] | 861 | "enable-tab-capture", |
| 862 | IDS_ENABLE_TAB_CAPTURE_NAME, |
| 863 | IDS_ENABLE_TAB_CAPTURE_DESCRIPTION, |
[email protected] | a692d13 | 2012-10-31 05:15:25 | [diff] [blame] | 864 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 865 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1", |
| 866 | switches::kTabCapture, "0") |
[email protected] | 0b9383a | 2012-10-26 00:58:16 | [diff] [blame] | 867 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 868 | #if defined(OS_CHROMEOS) |
| 869 | { |
[email protected] | 7c4a9bc | 2012-09-11 22:10:05 | [diff] [blame] | 870 | "enable-background-loader", |
| 871 | IDS_ENABLE_BACKLOADER_NAME, |
| 872 | IDS_ENABLE_BACKLOADER_DESCRIPTION, |
| 873 | kOsCrOS, |
| 874 | SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader) |
| 875 | }, |
| 876 | { |
[email protected] | c5667b28 | 2012-08-31 00:32:50 | [diff] [blame] | 877 | "enable-bezel-touch", |
| 878 | IDS_ENABLE_BEZEL_TOUCH_NAME, |
| 879 | IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION, |
[email protected] | 1995d80d | 2012-08-23 02:58:47 | [diff] [blame] | 880 | kOsCrOS, |
[email protected] | c5667b28 | 2012-08-31 00:32:50 | [diff] [blame] | 881 | SINGLE_VALUE_TYPE(switches::kEnableBezelTouch) |
[email protected] | 1995d80d | 2012-08-23 02:58:47 | [diff] [blame] | 882 | }, |
| 883 | { |
[email protected] | 3f4181a | 2013-02-01 21:31:07 | [diff] [blame] | 884 | "enable-screensaver-extension", |
| 885 | IDS_ENABLE_SCREENSAVER_EXTENSION_NAME, |
| 886 | IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION, |
| 887 | kOsCrOS, |
| 888 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions) |
| 889 | }, |
| 890 | { |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 891 | "no-discard-tabs", |
| 892 | IDS_FLAGS_NO_DISCARD_TABS_NAME, |
| 893 | IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION, |
| 894 | kOsCrOS, |
| 895 | SINGLE_VALUE_TYPE(switches::kNoDiscardTabs) |
| 896 | }, |
| 897 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 898 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 899 | "enable-download-resumption", |
| 900 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 901 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 902 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 903 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 904 | }, |
| 905 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 906 | "allow-nacl-socket-api", |
| 907 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 908 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 909 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 910 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 911 | }, |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 912 | { |
[email protected] | 60673ad7 | 2012-05-02 06:16:33 | [diff] [blame] | 913 | "stacked-tab-strip", |
| 914 | IDS_FLAGS_STACKED_TAB_STRIP_NAME, |
| 915 | IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION, |
| 916 | kOsWin, |
| 917 | SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip) |
| 918 | }, |
| 919 | { |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 920 | "force-device-scale-factor", |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 921 | IDS_FLAGS_FORCE_HIGH_DPI_NAME, |
| 922 | IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION, |
| 923 | kOsCrOS, |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 924 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2") |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 925 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 926 | #if defined(OS_CHROMEOS) |
| 927 | { |
| 928 | "allow-touchpad-three-finger-click", |
| 929 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 930 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 931 | kOsCrOS, |
| 932 | SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick) |
| 933 | }, |
[email protected] | fbc176b6 | 2012-10-27 02:19:58 | [diff] [blame] | 934 | { |
| 935 | "allow-touchpad-three-finger-swipe", |
| 936 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME, |
| 937 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION, |
| 938 | kOsCrOS, |
| 939 | SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe) |
| 940 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 941 | #endif |
[email protected] | 1992a2f4 | 2012-10-23 18:32:21 | [diff] [blame] | 942 | { |
[email protected] | a585e46 | 2013-01-26 00:37:15 | [diff] [blame] | 943 | "use-client-login-signin-flow", |
| 944 | IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME, |
| 945 | IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION, |
[email protected] | 1992a2f4 | 2012-10-23 18:32:21 | [diff] [blame] | 946 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a585e46 | 2013-01-26 00:37:15 | [diff] [blame] | 947 | SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow) |
[email protected] | 1992a2f4 | 2012-10-23 18:32:21 | [diff] [blame] | 948 | }, |
[email protected] | 8ee0224 | 2012-12-04 15:23:32 | [diff] [blame] | 949 | { |
| 950 | "enable-desktop-guest-mode", |
| 951 | IDS_FLAGS_DESKTOP_GUEST_MODE_NAME, |
| 952 | IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION, |
| 953 | kOsMac | kOsWin | kOsLinux, |
| 954 | SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode) |
| 955 | }, |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 956 | #if defined(USE_ASH) |
| 957 | { |
[email protected] | 8257d38 | 2013-03-26 13:08:42 | [diff] [blame] | 958 | "show-launcher-alignment-menu", |
| 959 | IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME, |
| 960 | IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION, |
[email protected] | 35a4ced | 2013-02-06 23:24:42 | [diff] [blame] | 961 | kOsAll, |
[email protected] | 8257d38 | 2013-03-26 13:08:42 | [diff] [blame] | 962 | SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu) |
[email protected] | 35a4ced | 2013-02-06 23:24:42 | [diff] [blame] | 963 | }, |
| 964 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 965 | "show-touch-hud", |
| 966 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 967 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 968 | kOsAll, |
| 969 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 970 | }, |
| 971 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 972 | "enable-pinch", |
| 973 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 974 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 975 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 976 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 977 | }, |
| 978 | { |
| 979 | "pinch-zoom-scrollbars", |
| 980 | IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME, |
| 981 | IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION, |
| 982 | kOsCrOS, |
| 983 | ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars, |
| 984 | cc::switches::kDisablePinchZoomScrollbars) |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 985 | }, |
[email protected] | a837931 | 2012-06-15 00:20:43 | [diff] [blame] | 986 | { |
| 987 | "app-list-show-apps-only", |
| 988 | IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME, |
| 989 | IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION, |
| 990 | kOsAll, |
[email protected] | 0bc6c27 | 2012-07-17 03:32:03 | [diff] [blame] | 991 | SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly), |
[email protected] | a837931 | 2012-06-15 00:20:43 | [diff] [blame] | 992 | }, |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 993 | #endif // defined(USE_ASH) |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 994 | #if defined(OS_CHROMEOS) |
| 995 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 996 | "disable-boot-animation", |
| 997 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 998 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
| 999 | kOsCrOS, |
| 1000 | SINGLE_VALUE_TYPE(switches::kDisableBootAnimation), |
| 1001 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 1002 | { |
[email protected] | b455719 | 2012-09-19 11:29:58 | [diff] [blame] | 1003 | "disable-boot-animation2", |
| 1004 | IDS_FLAGS_DISABLE_BOOT_ANIMATION2, |
| 1005 | IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION, |
| 1006 | kOsCrOS, |
| 1007 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2), |
| 1008 | }, |
| 1009 | { |
[email protected] | ea2f334 | 2012-09-21 21:13:36 | [diff] [blame] | 1010 | "boot-animation-fucntion", |
| 1011 | IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION, |
| 1012 | IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION, |
| 1013 | kOsCrOS, |
| 1014 | MULTI_VALUE_TYPE(kAshBootAnimationFunction), |
| 1015 | }, |
[email protected] | 839667d6 | 2012-10-23 19:38:57 | [diff] [blame] | 1016 | { |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 1017 | "captive-portal-detector", |
| 1018 | IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME, |
| 1019 | IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION, |
| 1020 | kOsCrOS, |
| 1021 | MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices), |
| 1022 | }, |
| 1023 | { |
[email protected] | c11aa8f1 | 2012-12-18 18:43:14 | [diff] [blame] | 1024 | "disable-new-lock-animations", |
[email protected] | 839667d6 | 2012-10-23 19:38:57 | [diff] [blame] | 1025 | IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS, |
| 1026 | IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION, |
| 1027 | kOsCrOS, |
[email protected] | c11aa8f1 | 2012-12-18 18:43:14 | [diff] [blame] | 1028 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations), |
[email protected] | 839667d6 | 2012-10-23 19:38:57 | [diff] [blame] | 1029 | }, |
[email protected] | f028095 | 2012-11-06 20:30:50 | [diff] [blame] | 1030 | { |
[email protected] | 0fb5c485 | 2012-11-08 20:33:23 | [diff] [blame] | 1031 | "file-manager-packaged", |
| 1032 | IDS_FLAGS_FILE_MANAGER_PACKAGED_NAME, |
| 1033 | IDS_FLAGS_FILE_MANAGER_PACKAGED_DESCRIPTION, |
| 1034 | kOsCrOS, |
| 1035 | SINGLE_VALUE_TYPE(switches::kFileManagerPackaged), |
| 1036 | }, |
[email protected] | 3e035e8 | 2012-11-27 20:54:32 | [diff] [blame] | 1037 | { |
[email protected] | 8039e06c | 2013-01-17 23:34:50 | [diff] [blame] | 1038 | "disable-launcher-per-display", |
| 1039 | IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME, |
| 1040 | IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1041 | kOsCrOS, |
[email protected] | 8039e06c | 2013-01-17 23:34:50 | [diff] [blame] | 1042 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay), |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1043 | }, |
[email protected] | 06b146d | 2013-02-07 06:06:47 | [diff] [blame] | 1044 | { |
[email protected] | c64d773 | 2013-03-25 18:09:50 | [diff] [blame] | 1045 | "disable-app-mode", |
[email protected] | 640aa2b | 2013-03-22 16:00:52 | [diff] [blame] | 1046 | IDS_FLAGS_DISABLE_KIOSK_APPS_NAME, |
| 1047 | IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION, |
[email protected] | 06b146d | 2013-02-07 06:06:47 | [diff] [blame] | 1048 | kOsCrOS, |
[email protected] | 640aa2b | 2013-03-22 16:00:52 | [diff] [blame] | 1049 | SINGLE_VALUE_TYPE(switches::kDisableAppMode), |
[email protected] | 06b146d | 2013-02-07 06:06:47 | [diff] [blame] | 1050 | }, |
[email protected] | 6ad015c | 2013-03-06 00:49:51 | [diff] [blame] | 1051 | { |
[email protected] | c64d773 | 2013-03-25 18:09:50 | [diff] [blame] | 1052 | "disable-force-fullscreen-app", |
[email protected] | 640aa2b | 2013-03-22 16:00:52 | [diff] [blame] | 1053 | IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME, |
| 1054 | IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION, |
[email protected] | 6ad015c | 2013-03-06 00:49:51 | [diff] [blame] | 1055 | kOsCrOS, |
[email protected] | 640aa2b | 2013-03-22 16:00:52 | [diff] [blame] | 1056 | SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp), |
[email protected] | 6ad015c | 2013-03-06 00:49:51 | [diff] [blame] | 1057 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1058 | #endif // defined(OS_CHROMEOS) |
[email protected] | fc7a93c | 2012-06-08 20:25:39 | [diff] [blame] | 1059 | { |
[email protected] | 6247aba | 2013-03-04 22:57:18 | [diff] [blame] | 1060 | "views-textfield", |
| 1061 | IDS_FLAGS_VIEWS_TEXTFIELD_NAME, |
| 1062 | IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION, |
[email protected] | fc7a93c | 2012-06-08 20:25:39 | [diff] [blame] | 1063 | kOsWin, |
[email protected] | 6247aba | 2013-03-04 22:57:18 | [diff] [blame] | 1064 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield, |
| 1065 | switches::kDisableViewsTextfield), |
[email protected] | fc7a93c | 2012-06-08 20:25:39 | [diff] [blame] | 1066 | }, |
[email protected] | bd0cd3bb | 2012-06-14 03:03:38 | [diff] [blame] | 1067 | { |
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 1068 | "enable-new-dialog-style", |
| 1069 | IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME, |
| 1070 | IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION, |
[email protected] | fcb88de | 2012-07-12 22:25:32 | [diff] [blame] | 1071 | kOsWin | kOsCrOS, |
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 1072 | SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle), |
[email protected] | fcb88de | 2012-07-12 22:25:32 | [diff] [blame] | 1073 | }, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1074 | { "disable-accelerated-video-decode", |
| 1075 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1076 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1077 | kOsDesktop, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1078 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1079 | }, |
[email protected] | 66ae9fc | 2012-06-19 21:33:52 | [diff] [blame] | 1080 | #if defined(USE_ASH) |
| 1081 | { |
| 1082 | "ash-debug-shortcuts", |
| 1083 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1084 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1085 | kOsAll, |
| 1086 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1087 | }, |
| 1088 | #endif |
[email protected] | 37fee094 | 2012-08-07 21:07:45 | [diff] [blame] | 1089 | { |
[email protected] | ad3f6d2 | 2012-08-29 02:34:19 | [diff] [blame] | 1090 | "enable-contacts", |
| 1091 | IDS_FLAGS_ENABLE_CONTACTS_NAME, |
| 1092 | IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION, |
| 1093 | kOsCrOS, |
| 1094 | SINGLE_VALUE_TYPE(switches::kEnableContacts) |
| 1095 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1096 | #if defined(USE_ASH) |
| 1097 | { "ash-enable-advanced-gestures", |
| 1098 | IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME, |
| 1099 | IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION, |
| 1100 | kOsCrOS, |
| 1101 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures), |
| 1102 | }, |
[email protected] | cfa24e6 | 2013-02-13 21:19:11 | [diff] [blame] | 1103 | { "ash-disable-tab-scrubbing", |
| 1104 | IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME, |
| 1105 | IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION, |
[email protected] | 51075f8c | 2012-11-13 01:48:16 | [diff] [blame] | 1106 | kOsCrOS, |
[email protected] | cfa24e6 | 2013-02-13 21:19:11 | [diff] [blame] | 1107 | SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing), |
[email protected] | 51075f8c | 2012-11-13 01:48:16 | [diff] [blame] | 1108 | }, |
[email protected] | 83eef80 | 2012-12-02 07:43:52 | [diff] [blame] | 1109 | { "ash-enable-workspace-scrubbing", |
| 1110 | IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME, |
| 1111 | IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION, |
| 1112 | kOsCrOS, |
| 1113 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing), |
| 1114 | }, |
[email protected] | 819e58d2 | 2013-03-20 00:16:11 | [diff] [blame] | 1115 | { "ash-immersive-fullscreen", |
| 1116 | IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME, |
| 1117 | IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION, |
[email protected] | c043df27 | 2012-11-21 00:43:24 | [diff] [blame] | 1118 | kOsCrOS, |
[email protected] | 819e58d2 | 2013-03-20 00:16:11 | [diff] [blame] | 1119 | SINGLE_VALUE_TYPE(ash::switches::kAshImmersiveFullscreen), |
[email protected] | c043df27 | 2012-11-21 00:43:24 | [diff] [blame] | 1120 | }, |
[email protected] | 316708a | 2012-11-05 22:57:02 | [diff] [blame] | 1121 | #if defined(OS_LINUX) |
| 1122 | { "ash-enable-memory-monitor", |
| 1123 | IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME, |
| 1124 | IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION, |
| 1125 | kOsCrOS, |
| 1126 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor), |
| 1127 | }, |
| 1128 | #endif |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1129 | #endif |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1130 | #if defined(OS_CHROMEOS) |
[email protected] | 9475ee6f | 2013-03-08 18:20:09 | [diff] [blame] | 1131 | { "ash-disable-new-network-status-area", |
| 1132 | IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME, |
| 1133 | IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION, |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 1134 | kOsCrOS, |
[email protected] | 9475ee6f | 2013-03-08 18:20:09 | [diff] [blame] | 1135 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea), |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 1136 | }, |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1137 | { |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1138 | "enable-carrier-switching", |
| 1139 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING, |
| 1140 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION, |
| 1141 | kOsCrOS, |
| 1142 | SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching) |
| 1143 | }, |
| 1144 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1145 | "enable-request-tablet-site", |
| 1146 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1147 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1148 | kOsCrOS, |
| 1149 | SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite) |
| 1150 | }, |
| 1151 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1152 | { |
| 1153 | "debug-packed-apps", |
| 1154 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1155 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1156 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1157 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1158 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1159 | { |
| 1160 | "enable-password-generation", |
| 1161 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1162 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1163 | kOsDesktop, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1164 | SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration) |
| 1165 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1166 | { |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1167 | "enable-deferred-image-decoding", |
| 1168 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME, |
| 1169 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1170 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1171 | SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding) |
| 1172 | }, |
| 1173 | { |
[email protected] | 075543d | 2012-10-24 01:29:14 | [diff] [blame] | 1174 | "performance-monitor-gathering", |
| 1175 | IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME, |
| 1176 | IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION, |
| 1177 | kOsAll, |
| 1178 | SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering) |
| 1179 | }, |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 1180 | { |
[email protected] | 90b482d | 2013-04-04 10:45:58 | [diff] [blame] | 1181 | "disable-native-autofill-ui", |
| 1182 | IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME, |
| 1183 | IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION, |
[email protected] | 1fdeac7 | 2013-03-19 17:28:43 | [diff] [blame] | 1184 | kOsDesktop, |
[email protected] | 90b482d | 2013-04-04 10:45:58 | [diff] [blame] | 1185 | SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi) |
[email protected] | 1fdeac7 | 2013-03-19 17:28:43 | [diff] [blame] | 1186 | }, |
| 1187 | { |
[email protected] | 99002fd | 2012-11-06 04:35:52 | [diff] [blame] | 1188 | "show-app-list-shortcut", |
| 1189 | IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME, |
| 1190 | IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION, |
| 1191 | kOsWin, |
[email protected] | 7d1d209 | 2013-03-04 04:12:43 | [diff] [blame] | 1192 | SINGLE_VALUE_TYPE(apps::switches::kShowAppListShortcut) |
[email protected] | 99002fd | 2012-11-06 04:35:52 | [diff] [blame] | 1193 | }, |
[email protected] | a7259fb | 2012-11-08 06:22:23 | [diff] [blame] | 1194 | { |
| 1195 | "enable-experimental-form-filling", |
| 1196 | IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME, |
| 1197 | IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION, |
| 1198 | kOsWin | kOsCrOS, |
| 1199 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalFormFilling) |
| 1200 | }, |
[email protected] | 6e6efe4 | 2013-01-30 00:04:50 | [diff] [blame] | 1201 | { |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1202 | "wallet-service-use-prod", |
| 1203 | IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME, |
| 1204 | IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION, |
| 1205 | kOsCrOS | kOsWin, |
| 1206 | SINGLE_VALUE_TYPE(switches::kWalletServiceUseProd) |
| 1207 | }, |
| 1208 | { |
[email protected] | 6e6efe4 | 2013-01-30 00:04:50 | [diff] [blame] | 1209 | "enable-interactive-autocomplete", |
| 1210 | IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME, |
| 1211 | IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION, |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 1212 | kOsWin | kOsCrOS | kOsAndroid, |
[email protected] | 6e6efe4 | 2013-01-30 00:04:50 | [diff] [blame] | 1213 | SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete) |
| 1214 | }, |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1215 | { |
| 1216 | "enable-touch-drag-drop", |
| 1217 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1218 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1219 | kOsWin | kOsCrOS, |
| 1220 | SINGLE_VALUE_TYPE(switches::kEnableTouchDragDrop) |
| 1221 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1222 | { |
| 1223 | "enable-touch-editing", |
| 1224 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1225 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
| 1226 | kOsCrOS, |
| 1227 | SINGLE_VALUE_TYPE(switches::kEnableTouchEditing) |
| 1228 | }, |
[email protected] | f1c3924 | 2013-01-29 16:13:01 | [diff] [blame] | 1229 | #if defined(ENABLE_MESSAGE_CENTER) |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1230 | { |
| 1231 | "enable-rich-notifications", |
| 1232 | IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME, |
| 1233 | IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION, |
| 1234 | kOsWin | kOsCrOS, |
[email protected] | aee412aa | 2013-04-02 20:01:23 | [diff] [blame] | 1235 | ENABLE_DISABLE_VALUE_TYPE( |
| 1236 | message_center::switches::kEnableRichNotifications, |
| 1237 | message_center::switches::kDisableRichNotifications) |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1238 | }, |
[email protected] | f1c3924 | 2013-01-29 16:13:01 | [diff] [blame] | 1239 | #endif |
[email protected] | 4d51c68 | 2012-12-11 11:34:55 | [diff] [blame] | 1240 | { |
| 1241 | "full-history-sync", |
| 1242 | IDS_FLAGS_FULL_HISTORY_SYNC_NAME, |
| 1243 | IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION, |
| 1244 | kOsAll, |
| 1245 | SINGLE_VALUE_TYPE(switches::kHistoryEnableFullHistorySync) |
| 1246 | }, |
[email protected] | 628a69a9 | 2012-12-23 04:09:34 | [diff] [blame] | 1247 | { |
[email protected] | fd03014 | 2013-02-08 02:04:38 | [diff] [blame] | 1248 | "enable-usermedia-screen-capture", |
| 1249 | IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME, |
| 1250 | IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION, |
| 1251 | kOsDesktop, |
| 1252 | SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing) |
| 1253 | }, |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1254 | { |
| 1255 | "enable-apps-devtool-app", |
| 1256 | IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME, |
| 1257 | IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION, |
| 1258 | kOsDesktop, |
| 1259 | SINGLE_VALUE_TYPE(switches::kAppsDevtool) |
| 1260 | }, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1261 | { |
| 1262 | "impl-side-painting", |
| 1263 | IDS_FLAGS_IMPL_SIDE_PAINTING_NAME, |
| 1264 | IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION, |
[email protected] | 532fe2e | 2013-03-18 17:00:04 | [diff] [blame] | 1265 | kOsAndroid | kOsLinux | kOsCrOS, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1266 | MULTI_VALUE_TYPE(kImplSidePaintingChoices) |
| 1267 | }, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1268 | { |
| 1269 | "max-prepaint-tile-distance", |
| 1270 | IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_NAME, |
| 1271 | IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_DESCRIPTION, |
| 1272 | kOsAndroid | kOsLinux | kOsCrOS, |
| 1273 | MULTI_VALUE_TYPE(kMaxPrepaintTileDistanceChoices) |
| 1274 | }, |
| 1275 | { |
| 1276 | "max-tiles-for-interest-area", |
| 1277 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME, |
| 1278 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION, |
| 1279 | kOsAndroid | kOsLinux | kOsCrOS, |
| 1280 | MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices) |
| 1281 | }, |
[email protected] | 2f2f72b | 2013-03-08 22:37:31 | [diff] [blame] | 1282 | // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura. |
| 1283 | #if !defined(USE_AURA) |
[email protected] | 484deaa | 2013-03-01 03:10:37 | [diff] [blame] | 1284 | { |
| 1285 | "track-active-visit-time", |
| 1286 | IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME, |
| 1287 | IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION, |
| 1288 | kOsWin, |
| 1289 | SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime) |
| 1290 | }, |
[email protected] | 2f2f72b | 2013-03-08 22:37:31 | [diff] [blame] | 1291 | #endif |
[email protected] | 8cc71d4 | 2013-03-02 17:26:08 | [diff] [blame] | 1292 | #if defined(OS_ANDROID) |
| 1293 | { |
| 1294 | "disable-gesture-requirement-for-media-playback", |
| 1295 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1296 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1297 | kOsAndroid, |
| 1298 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1299 | }, |
| 1300 | #endif |
[email protected] | e79f2fd5 | 2013-03-08 23:52:47 | [diff] [blame] | 1301 | #if defined(OS_CHROMEOS) |
| 1302 | { |
| 1303 | "enable-experimental-bluetooth", |
| 1304 | IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME, |
| 1305 | IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION, |
| 1306 | kOsCrOS, |
| 1307 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth) |
| 1308 | }, |
| 1309 | #endif |
[email protected] | 6077cab | 2013-03-11 19:36:14 | [diff] [blame] | 1310 | #if defined(ENABLE_GOOGLE_NOW) |
| 1311 | { |
| 1312 | "enable-google-now", |
| 1313 | IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME, |
| 1314 | IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION, |
| 1315 | kOsWin | kOsCrOS, |
| 1316 | SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration) |
| 1317 | }, |
| 1318 | #endif |
[email protected] | 4a9e2e0 | 2013-04-08 16:19:49 | [diff] [blame] | 1319 | { |
| 1320 | "enable-translate-alpha-languages", |
| 1321 | IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME, |
| 1322 | IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION, |
| 1323 | kOsAll, |
| 1324 | SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages) |
| 1325 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1326 | #if defined(OS_CHROMEOS) |
| 1327 | { |
| 1328 | "enable-virtual-keyboard", |
| 1329 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1330 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1331 | kOsCrOS, |
| 1332 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1333 | }, |
| 1334 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame^] | 1335 | { |
| 1336 | "enable-simple-cache-backend", |
| 1337 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1338 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
| 1339 | kOsAndroid, |
| 1340 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1341 | }, |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 1342 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1343 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1344 | const Experiment* experiments = kExperiments; |
| 1345 | size_t num_experiments = arraysize(kExperiments); |
| 1346 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1347 | // Stores and encapsulates the little state that about:flags has. |
| 1348 | class FlagsState { |
| 1349 | public: |
| 1350 | FlagsState() : needs_restart_(false) {} |
| 1351 | void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| 1352 | bool IsRestartNeededToCommitChanges(); |
| 1353 | void SetExperimentEnabled( |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1354 | PrefService* prefs, const std::string& internal_name, bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1355 | void RemoveFlagsSwitches( |
| 1356 | std::map<std::string, CommandLine::StringType>* switch_list); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 1357 | void ResetAllFlags(PrefService* prefs); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1358 | void reset(); |
| 1359 | |
| 1360 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1361 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1362 | return Singleton<FlagsState>::get(); |
| 1363 | } |
| 1364 | |
| 1365 | private: |
| 1366 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1367 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1368 | |
| 1369 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 1370 | }; |
| 1371 | |
[email protected] | c7b7800a | 2010-10-07 18:51:35 | [diff] [blame] | 1372 | // Extracts the list of enabled lab experiments from preferences and stores them |
[email protected] | c634337 | 2013-03-13 17:05:49 | [diff] [blame] | 1373 | // in a set. |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1374 | void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1375 | const ListValue* enabled_experiments = prefs->GetList( |
| 1376 | prefs::kEnabledLabsExperiments); |
| 1377 | if (!enabled_experiments) |
| 1378 | return; |
| 1379 | |
| 1380 | for (ListValue::const_iterator it = enabled_experiments->begin(); |
| 1381 | it != enabled_experiments->end(); |
| 1382 | ++it) { |
| 1383 | std::string experiment_name; |
| 1384 | if (!(*it)->GetAsString(&experiment_name)) { |
| 1385 | LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments; |
| 1386 | continue; |
| 1387 | } |
| 1388 | result->insert(experiment_name); |
| 1389 | } |
| 1390 | } |
| 1391 | |
[email protected] | c634337 | 2013-03-13 17:05:49 | [diff] [blame] | 1392 | // Takes a set of enabled lab experiments |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1393 | void SetEnabledFlags( |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1394 | PrefService* prefs, const std::set<std::string>& enabled_experiments) { |
[email protected] | 1bc7842 | 2011-03-31 08:41:38 | [diff] [blame] | 1395 | ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments); |
| 1396 | ListValue* experiments_list = update.Get(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1397 | |
| 1398 | experiments_list->Clear(); |
| 1399 | for (std::set<std::string>::const_iterator it = enabled_experiments.begin(); |
| 1400 | it != enabled_experiments.end(); |
| 1401 | ++it) { |
| 1402 | experiments_list->Append(new StringValue(*it)); |
| 1403 | } |
| 1404 | } |
| 1405 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1406 | // Adds the internal names for the specified experiment to |names|. |
| 1407 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 1408 | if (e.type == Experiment::SINGLE_VALUE) { |
| 1409 | names->insert(e.internal_name); |
| 1410 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1411 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 1412 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1413 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1414 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1415 | } |
| 1416 | } |
| 1417 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1418 | // Confirms that an experiment is valid, used in a DCHECK in |
| 1419 | // SanitizeList below. |
| 1420 | bool ValidateExperiment(const Experiment& e) { |
| 1421 | switch (e.type) { |
| 1422 | case Experiment::SINGLE_VALUE: |
| 1423 | DCHECK_EQ(0, e.num_choices); |
| 1424 | DCHECK(!e.choices); |
| 1425 | break; |
| 1426 | case Experiment::MULTI_VALUE: |
| 1427 | DCHECK_GT(e.num_choices, 0); |
| 1428 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1429 | DCHECK(e.choices[0].command_line_switch); |
| 1430 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1431 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1432 | case Experiment::ENABLE_DISABLE_VALUE: |
| 1433 | DCHECK_EQ(3, e.num_choices); |
| 1434 | DCHECK(!e.choices); |
| 1435 | DCHECK(e.command_line_switch); |
| 1436 | DCHECK(e.command_line_value); |
| 1437 | DCHECK(e.disable_command_line_switch); |
| 1438 | DCHECK(e.disable_command_line_value); |
| 1439 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1440 | default: |
| 1441 | NOTREACHED(); |
| 1442 | } |
| 1443 | return true; |
| 1444 | } |
| 1445 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1446 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 1447 | // unknown, to prevent this list to become very long as experiments are added |
| 1448 | // and removed. |
| 1449 | void SanitizeList(PrefService* prefs) { |
| 1450 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1451 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1452 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1453 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1454 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1455 | |
| 1456 | std::set<std::string> enabled_experiments; |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1457 | GetEnabledFlags(prefs, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1458 | |
| 1459 | std::set<std::string> new_enabled_experiments; |
| 1460 | std::set_intersection( |
| 1461 | known_experiments.begin(), known_experiments.end(), |
| 1462 | enabled_experiments.begin(), enabled_experiments.end(), |
| 1463 | std::inserter(new_enabled_experiments, new_enabled_experiments.begin())); |
| 1464 | |
[email protected] | 4c8853f | 2012-07-23 01:29:16 | [diff] [blame] | 1465 | if (new_enabled_experiments != enabled_experiments) |
| 1466 | SetEnabledFlags(prefs, new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1467 | } |
| 1468 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1469 | void GetSanitizedEnabledFlags( |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1470 | PrefService* prefs, std::set<std::string>* result) { |
| 1471 | SanitizeList(prefs); |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1472 | GetEnabledFlags(prefs, result); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1473 | } |
| 1474 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1475 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 1476 | // enabled on the current platform. |
| 1477 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
| 1478 | PrefService* prefs, std::set<std::string>* result) { |
| 1479 | GetSanitizedEnabledFlags(prefs, result); |
| 1480 | |
| 1481 | // Filter out any experiments that aren't enabled on the current platform. We |
| 1482 | // don't remove these from prefs else syncing to a platform with a different |
| 1483 | // set of experiments would be lossy. |
| 1484 | std::set<std::string> platform_experiments; |
| 1485 | int current_platform = GetCurrentPlatform(); |
| 1486 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1487 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1488 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1489 | } |
| 1490 | |
| 1491 | std::set<std::string> new_enabled_experiments; |
| 1492 | std::set_intersection( |
| 1493 | platform_experiments.begin(), platform_experiments.end(), |
| 1494 | result->begin(), result->end(), |
| 1495 | std::inserter(new_enabled_experiments, new_enabled_experiments.begin())); |
| 1496 | |
| 1497 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1498 | } |
| 1499 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1500 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1501 | Value* CreateChoiceData(const Experiment& experiment, |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1502 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1503 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 1504 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1505 | ListValue* result = new ListValue; |
| 1506 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1507 | DictionaryValue* value = new DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1508 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1509 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1510 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1511 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1512 | result->Append(value); |
| 1513 | } |
| 1514 | return result; |
| 1515 | } |
| 1516 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1517 | } // namespace |
| 1518 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1519 | std::string Experiment::NameForChoice(int index) const { |
| 1520 | DCHECK(type == Experiment::MULTI_VALUE || |
| 1521 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 1522 | DCHECK_LT(index, num_choices); |
| 1523 | return std::string(internal_name) + testing::kMultiSeparator + |
| 1524 | base::IntToString(index); |
| 1525 | } |
| 1526 | |
| 1527 | string16 Experiment::DescriptionForChoice(int index) const { |
| 1528 | DCHECK(type == Experiment::MULTI_VALUE || |
| 1529 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 1530 | DCHECK_LT(index, num_choices); |
| 1531 | int description_id; |
| 1532 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 1533 | const int kEnableDisableDescriptionIds[] = { |
| 1534 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 1535 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 1536 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 1537 | }; |
| 1538 | description_id = kEnableDisableDescriptionIds[index]; |
| 1539 | } else { |
| 1540 | description_id = choices[index].description_id; |
| 1541 | } |
| 1542 | return l10n_util::GetStringUTF16(description_id); |
| 1543 | } |
| 1544 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1545 | void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1546 | FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1547 | } |
| 1548 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1549 | ListValue* GetFlagsExperimentsData(PrefService* prefs) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1550 | std::set<std::string> enabled_experiments; |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1551 | GetSanitizedEnabledFlags(prefs, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1552 | |
| 1553 | int current_platform = GetCurrentPlatform(); |
| 1554 | |
| 1555 | ListValue* experiments_data = new ListValue(); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1556 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1557 | const Experiment& experiment = experiments[i]; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1558 | |
[email protected] | 1fd1f29 | 2013-03-23 23:08:40 | [diff] [blame] | 1559 | #if defined(OS_ANDROID) |
| 1560 | // Special case enable-spdy-proxy-auth, because it should only |
| 1561 | // be available on Dev and Beta channels. |
| 1562 | if (!strcmp("enable-spdy-proxy-auth", experiment.internal_name) && |
| 1563 | chrome::VersionInfo::GetChannel() == |
| 1564 | chrome::VersionInfo::CHANNEL_STABLE) |
| 1565 | continue; |
| 1566 | #endif |
| 1567 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1568 | DictionaryValue* data = new DictionaryValue(); |
| 1569 | data->SetString("internal_name", experiment.internal_name); |
| 1570 | data->SetString("name", |
| 1571 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 1572 | data->SetString("description", |
| 1573 | l10n_util::GetStringUTF16( |
| 1574 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 1575 | bool supported = !!(experiment.supported_platforms & current_platform); |
| 1576 | data->SetBoolean("supported", supported); |
| 1577 | |
| 1578 | ListValue* supported_platforms = new ListValue(); |
| 1579 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 1580 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1581 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1582 | switch (experiment.type) { |
| 1583 | case Experiment::SINGLE_VALUE: |
| 1584 | data->SetBoolean( |
| 1585 | "enabled", |
| 1586 | enabled_experiments.count(experiment.internal_name) > 0); |
| 1587 | break; |
| 1588 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1589 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1590 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 1591 | break; |
| 1592 | default: |
| 1593 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1594 | } |
| 1595 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1596 | experiments_data->Append(data); |
| 1597 | } |
| 1598 | return experiments_data; |
| 1599 | } |
| 1600 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1601 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1602 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1603 | } |
| 1604 | |
| 1605 | void SetExperimentEnabled( |
[email protected] | c7b7800a | 2010-10-07 18:51:35 | [diff] [blame] | 1606 | PrefService* prefs, const std::string& internal_name, bool enable) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1607 | FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1608 | } |
| 1609 | |
| 1610 | void RemoveFlagsSwitches( |
| 1611 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1612 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1613 | } |
| 1614 | |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 1615 | void ResetAllFlags(PrefService* prefs) { |
| 1616 | FlagsState::GetInstance()->ResetAllFlags(prefs); |
| 1617 | } |
| 1618 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1619 | int GetCurrentPlatform() { |
| 1620 | #if defined(OS_MACOSX) |
| 1621 | return kOsMac; |
| 1622 | #elif defined(OS_WIN) |
| 1623 | return kOsWin; |
| 1624 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 1625 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 1626 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1627 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 1628 | #elif defined(OS_ANDROID) |
| 1629 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1630 | #else |
| 1631 | #error Unknown platform |
| 1632 | #endif |
| 1633 | } |
| 1634 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 1635 | void RecordUMAStatistics(const PrefService* prefs) { |
| 1636 | std::set<std::string> flags; |
| 1637 | GetEnabledFlags(prefs, &flags); |
| 1638 | for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
| 1639 | ++it) { |
| 1640 | std::string action("AboutFlags_"); |
| 1641 | action += *it; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 1642 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 1643 | } |
| 1644 | // Since flag metrics are recorded every startup, add a tick so that the |
| 1645 | // stats can be made meaningful. |
| 1646 | if (flags.size()) |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 1647 | content::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); |
| 1648 | content::RecordAction(UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 1649 | } |
| 1650 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1651 | ////////////////////////////////////////////////////////////////////////////// |
| 1652 | // FlagsState implementation. |
| 1653 | |
| 1654 | namespace { |
| 1655 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1656 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 1657 | NameToSwitchAndValueMap; |
| 1658 | |
| 1659 | void SetFlagToSwitchMapping(const std::string& key, |
| 1660 | const std::string& switch_name, |
| 1661 | const std::string& switch_value, |
| 1662 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 1663 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 1664 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 1665 | } |
| 1666 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1667 | void FlagsState::ConvertFlagsToSwitches( |
| 1668 | PrefService* prefs, CommandLine* command_line) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1669 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 1670 | return; |
| 1671 | |
| 1672 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 1673 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1674 | GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1675 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1676 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1677 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1678 | const Experiment& e = experiments[i]; |
| 1679 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1680 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 1681 | e.command_line_value, &name_to_switch_map); |
| 1682 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 1683 | for (int j = 0; j < e.num_choices; ++j) { |
| 1684 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 1685 | e.choices[j].command_line_switch, |
| 1686 | e.choices[j].command_line_value, |
| 1687 | &name_to_switch_map); |
| 1688 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1689 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1690 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 1691 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 1692 | &name_to_switch_map); |
| 1693 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 1694 | e.command_line_value, &name_to_switch_map); |
| 1695 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 1696 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1697 | } |
| 1698 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1699 | |
| 1700 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1701 | flags_switches_.insert( |
| 1702 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 1703 | std::string())); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1704 | for (std::set<std::string>::iterator it = enabled_experiments.begin(); |
| 1705 | it != enabled_experiments.end(); |
| 1706 | ++it) { |
| 1707 | const std::string& experiment_name = *it; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1708 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1709 | name_to_switch_map.find(experiment_name); |
| 1710 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 1711 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1712 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1713 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1714 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1715 | const std::pair<std::string, std::string>& |
| 1716 | switch_and_value_pair = name_to_switch_it->second; |
| 1717 | |
| 1718 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 1719 | switch_and_value_pair.second); |
| 1720 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1721 | } |
| 1722 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1723 | flags_switches_.insert( |
| 1724 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 1725 | std::string())); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1726 | } |
| 1727 | |
| 1728 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 1729 | return needs_restart_; |
| 1730 | } |
| 1731 | |
| 1732 | void FlagsState::SetExperimentEnabled( |
| 1733 | PrefService* prefs, const std::string& internal_name, bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1734 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1735 | if (at_index != std::string::npos) { |
| 1736 | DCHECK(enable); |
| 1737 | // We're being asked to enable a multi-choice experiment. Disable the |
| 1738 | // currently selected choice. |
| 1739 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1740 | const std::string experiment_name = internal_name.substr(0, at_index); |
| 1741 | SetExperimentEnabled(prefs, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1742 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1743 | // And enable the new choice, if it is not the default first choice. |
| 1744 | if (internal_name != experiment_name + "@0") { |
| 1745 | std::set<std::string> enabled_experiments; |
| 1746 | GetSanitizedEnabledFlags(prefs, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 1747 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1748 | SetEnabledFlags(prefs, enabled_experiments); |
| 1749 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1750 | return; |
| 1751 | } |
| 1752 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1753 | std::set<std::string> enabled_experiments; |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1754 | GetSanitizedEnabledFlags(prefs, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1755 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1756 | const Experiment* e = NULL; |
| 1757 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1758 | if (experiments[i].internal_name == internal_name) { |
| 1759 | e = experiments + i; |
| 1760 | break; |
| 1761 | } |
| 1762 | } |
| 1763 | DCHECK(e); |
| 1764 | |
| 1765 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 1766 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 1767 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 1768 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 1769 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1770 | } else { |
| 1771 | if (enable) { |
| 1772 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 1773 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1774 | } else { |
| 1775 | // Find the currently enabled choice and disable it. |
| 1776 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1777 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1778 | if (enabled_experiments.find(choice_name) != |
| 1779 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 1780 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1781 | enabled_experiments.erase(choice_name); |
| 1782 | // Continue on just in case there's a bug and more than one |
| 1783 | // experiment for this choice was enabled. |
| 1784 | } |
| 1785 | } |
| 1786 | } |
| 1787 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1788 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1789 | SetEnabledFlags(prefs, enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1790 | } |
| 1791 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1792 | void FlagsState::RemoveFlagsSwitches( |
| 1793 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1794 | for (std::map<std::string, std::string>::const_iterator |
| 1795 | it = flags_switches_.begin(); it != flags_switches_.end(); ++it) { |
| 1796 | switch_list->erase(it->first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1797 | } |
| 1798 | } |
| 1799 | |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 1800 | void FlagsState::ResetAllFlags(PrefService* prefs) { |
| 1801 | needs_restart_ = true; |
| 1802 | |
| 1803 | std::set<std::string> no_experiments; |
| 1804 | SetEnabledFlags(prefs, no_experiments); |
| 1805 | } |
| 1806 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1807 | void FlagsState::reset() { |
| 1808 | needs_restart_ = false; |
| 1809 | flags_switches_.clear(); |
| 1810 | } |
| 1811 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 1812 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1813 | |
| 1814 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1815 | |
| 1816 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 1817 | // also need to update the html file. |
| 1818 | const char kMultiSeparator[] = "@"; |
| 1819 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1820 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1821 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1822 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1823 | |
| 1824 | void SetExperiments(const Experiment* e, size_t count) { |
| 1825 | if (!e) { |
| 1826 | experiments = kExperiments; |
| 1827 | num_experiments = arraysize(kExperiments); |
| 1828 | } else { |
| 1829 | experiments = e; |
| 1830 | num_experiments = count; |
| 1831 | } |
| 1832 | } |
| 1833 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1834 | const Experiment* GetExperiments(size_t* count) { |
| 1835 | *count = num_experiments; |
| 1836 | return experiments; |
| 1837 | } |
| 1838 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1839 | } // namespace testing |
| 1840 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1841 | } // namespace about_flags |