Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/about_flags.cc

Issue 12221005: Add flag to disable impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Consolidated switch checking Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = { 238 const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 239 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
240 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR, 240 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
241 switches::kEnableChromeCaptivePortalDetector, ""}, 241 switches::kEnableChromeCaptivePortalDetector, ""},
242 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR, 242 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
243 switches::kDisableChromeCaptivePortalDetector, ""} 243 switches::kDisableChromeCaptivePortalDetector, ""}
244 }; 244 };
245 #endif 245 #endif
246 246
247 const Experiment::Choice kImplSidePaintingChoices[] = {
248 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
249 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
250 cc::switches::kEnableImplSidePainting, ""},
251 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
252 cc::switches::kDisableImplSidePainting, ""}
253 };
254
247 // RECORDING USER METRICS FOR FLAGS: 255 // RECORDING USER METRICS FOR FLAGS:
248 // ----------------------------------------------------------------------------- 256 // -----------------------------------------------------------------------------
249 // The first line of the experiment is the internal name. If you'd like to 257 // The first line of the experiment is the internal name. If you'd like to
250 // gather statistics about the usage of your flag, you should append a marker 258 // gather statistics about the usage of your flag, you should append a marker
251 // comment to the end of the feature name, like so: 259 // comment to the end of the feature name, like so:
252 // "my-special-feature", // FLAGS:RECORD_UMA 260 // "my-special-feature", // FLAGS:RECORD_UMA
253 // 261 //
254 // After doing that, run //chrome/tools/extract_actions.py (see instructions at 262 // After doing that, run //chrome/tools/extract_actions.py (see instructions at
255 // the top of that file for details) to update the chromeactions.txt file, which 263 // the top of that file for details) to update the chromeactions.txt file, which
256 // will enable UMA to record your feature flag. 264 // will enable UMA to record your feature flag.
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 kOsDesktop, 1286 kOsDesktop,
1279 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing) 1287 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1280 }, 1288 },
1281 { 1289 {
1282 "enable-apps-devtool-app", 1290 "enable-apps-devtool-app",
1283 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME, 1291 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1284 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION, 1292 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1285 kOsDesktop, 1293 kOsDesktop,
1286 SINGLE_VALUE_TYPE(switches::kAppsDevtool) 1294 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1287 }, 1295 },
1296 {
1297 "impl-side-painting",
1298 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1299 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
1300 kOsAndroid,
1301 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1302 },
1288 }; 1303 };
1289 1304
1290 const Experiment* experiments = kExperiments; 1305 const Experiment* experiments = kExperiments;
1291 size_t num_experiments = arraysize(kExperiments); 1306 size_t num_experiments = arraysize(kExperiments);
1292 1307
1293 // Stores and encapsulates the little state that about:flags has. 1308 // Stores and encapsulates the little state that about:flags has.
1294 class FlagsState { 1309 class FlagsState {
1295 public: 1310 public:
1296 FlagsState() : needs_restart_(false) {} 1311 FlagsState() : needs_restart_(false) {}
1297 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); 1312 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 } 1729 }
1715 1730
1716 const Experiment* GetExperiments(size_t* count) { 1731 const Experiment* GetExperiments(size_t* count) {
1717 *count = num_experiments; 1732 *count = num_experiments;
1718 return experiments; 1733 return experiments;
1719 } 1734 }
1720 1735
1721 } // namespace testing 1736 } // namespace testing
1722 1737
1723 } // namespace about_flags 1738 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698