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

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: Rebasing 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/browser/android/content_startup_flags.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 kOsDesktop, 1281 kOsDesktop,
1274 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing) 1282 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1275 }, 1283 },
1276 { 1284 {
1277 "enable-apps-devtool-app", 1285 "enable-apps-devtool-app",
1278 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME, 1286 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1279 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION, 1287 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1280 kOsDesktop, 1288 kOsDesktop,
1281 SINGLE_VALUE_TYPE(switches::kAppsDevtool) 1289 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1282 }, 1290 },
1291 {
1292 "impl-side-painting",
1293 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1294 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
1295 kOsAndroid,
1296 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1297 },
1283 }; 1298 };
1284 1299
1285 const Experiment* experiments = kExperiments; 1300 const Experiment* experiments = kExperiments;
1286 size_t num_experiments = arraysize(kExperiments); 1301 size_t num_experiments = arraysize(kExperiments);
1287 1302
1288 // Stores and encapsulates the little state that about:flags has. 1303 // Stores and encapsulates the little state that about:flags has.
1289 class FlagsState { 1304 class FlagsState {
1290 public: 1305 public:
1291 FlagsState() : needs_restart_(false) {} 1306 FlagsState() : needs_restart_(false) {}
1292 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); 1307 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 } 1736 }
1722 1737
1723 const Experiment* GetExperiments(size_t* count) { 1738 const Experiment* GetExperiments(size_t* count) {
1724 *count = num_experiments; 1739 *count = num_experiments;
1725 return experiments; 1740 return experiments;
1726 } 1741 }
1727 1742
1728 } // namespace testing 1743 } // namespace testing
1729 1744
1730 } // namespace about_flags 1745 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/browser/android/content_startup_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698