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

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

Issue 2807423002: Add color correct rendering to about:flags (Closed)
Patch Set: Fix histograms.xml Created 3 years, 8 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 | « no previous file | chrome/browser/flag_descriptions.h » ('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 <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 const FeatureEntry::Choice kEnableGpuRasterizationChoices[] = { 340 const FeatureEntry::Choice kEnableGpuRasterizationChoices[] = {
341 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 341 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
342 {flags_ui::kGenericExperimentChoiceEnabled, 342 {flags_ui::kGenericExperimentChoiceEnabled,
343 switches::kEnableGpuRasterization, ""}, 343 switches::kEnableGpuRasterization, ""},
344 {flags_ui::kGenericExperimentChoiceDisabled, 344 {flags_ui::kGenericExperimentChoiceDisabled,
345 switches::kDisableGpuRasterization, ""}, 345 switches::kDisableGpuRasterization, ""},
346 {flag_descriptions::kForceGpuRasterization, 346 {flag_descriptions::kForceGpuRasterization,
347 switches::kForceGpuRasterization, ""}, 347 switches::kForceGpuRasterization, ""},
348 }; 348 };
349 349
350 const FeatureEntry::Choice kColorCorrectRenderingChoices[] = {
351 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
352 {flags_ui::kGenericExperimentChoiceEnabled,
353 cc::switches::kEnableColorCorrectRendering, ""},
354 {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
355 };
356
350 const FeatureEntry::Choice kEnableWebGL2Choices[] = { 357 const FeatureEntry::Choice kEnableWebGL2Choices[] = {
351 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 358 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
352 {flags_ui::kGenericExperimentChoiceEnabled, switches::kEnableES3APIs, ""}, 359 {flags_ui::kGenericExperimentChoiceEnabled, switches::kEnableES3APIs, ""},
353 {flags_ui::kGenericExperimentChoiceDisabled, switches::kDisableES3APIs, ""}, 360 {flags_ui::kGenericExperimentChoiceDisabled, switches::kDisableES3APIs, ""},
354 }; 361 };
355 362
356 #if defined(OS_CHROMEOS) 363 #if defined(OS_CHROMEOS)
357 const FeatureEntry::Choice kMemoryPressureThresholdChoices[] = { 364 const FeatureEntry::Choice kMemoryPressureThresholdChoices[] = {
358 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 365 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
359 {flag_descriptions::kConservativeThresholds, 366 {flag_descriptions::kConservativeThresholds,
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 flag_descriptions::kEnableZipArchiverOnFileManagerDescription, kOsCrOS, 2688 flag_descriptions::kEnableZipArchiverOnFileManagerDescription, kOsCrOS,
2682 SINGLE_VALUE_TYPE(chromeos::switches::kEnableZipArchiverOnFileManager)}, 2689 SINGLE_VALUE_TYPE(chromeos::switches::kEnableZipArchiverOnFileManager)},
2683 #endif // OS_CHROMEOS 2690 #endif // OS_CHROMEOS
2684 2691
2685 #if defined(OS_ANDROID) 2692 #if defined(OS_ANDROID)
2686 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName, 2693 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName,
2687 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid, 2694 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid,
2688 FEATURE_VALUE_TYPE(features::kCopylessPaste)}, 2695 FEATURE_VALUE_TYPE(features::kCopylessPaste)},
2689 #endif 2696 #endif
2690 2697
2698 {"enable-color-correct-rendering",
2699 flag_descriptions::kColorCorrectRenderingName,
2700 flag_descriptions::kColorCorrectRenderingDescription, kOsAll,
2701 MULTI_VALUE_TYPE(kColorCorrectRenderingChoices)},
2702
2691 // NOTE: Adding new command-line switches requires adding corresponding 2703 // NOTE: Adding new command-line switches requires adding corresponding
2692 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2704 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2693 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2705 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2694 }; 2706 };
2695 2707
2696 class FlagsStateSingleton { 2708 class FlagsStateSingleton {
2697 public: 2709 public:
2698 FlagsStateSingleton() 2710 FlagsStateSingleton()
2699 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2711 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
2700 ~FlagsStateSingleton() {} 2712 ~FlagsStateSingleton() {}
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2897 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2909 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2898 2910
2899 const FeatureEntry* GetFeatureEntries(size_t* count) { 2911 const FeatureEntry* GetFeatureEntries(size_t* count) {
2900 *count = arraysize(kFeatureEntries); 2912 *count = arraysize(kFeatureEntries);
2901 return kFeatureEntries; 2913 return kFeatureEntries;
2902 } 2914 }
2903 2915
2904 } // namespace testing 2916 } // namespace testing
2905 2917
2906 } // namespace about_flags 2918 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698