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

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

Issue 2806263005: Convert the overlay scrollbar flag to use FeatureList (Closed)
Patch Set: update 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #include "ppapi/features/features.h" 88 #include "ppapi/features/features.h"
89 #include "printing/features/features.h" 89 #include "printing/features/features.h"
90 #include "ui/base/ui_base_switches.h" 90 #include "ui/base/ui_base_switches.h"
91 #include "ui/compositor/compositor_switches.h" 91 #include "ui/compositor/compositor_switches.h"
92 #include "ui/display/display_switches.h" 92 #include "ui/display/display_switches.h"
93 #include "ui/events/event_switches.h" 93 #include "ui/events/event_switches.h"
94 #include "ui/gfx/switches.h" 94 #include "ui/gfx/switches.h"
95 #include "ui/gl/gl_features.h" 95 #include "ui/gl/gl_features.h"
96 #include "ui/gl/gl_switches.h" 96 #include "ui/gl/gl_switches.h"
97 #include "ui/keyboard/keyboard_switches.h" 97 #include "ui/keyboard/keyboard_switches.h"
98 #include "ui/native_theme/native_theme_switches.h" 98 #include "ui/native_theme/native_theme_features.h"
99 #include "ui/views/views_switches.h" 99 #include "ui/views/views_switches.h"
100 100
101 #if defined(OS_ANDROID) 101 #if defined(OS_ANDROID)
102 #include "chrome/browser/android/chrome_feature_list.h" 102 #include "chrome/browser/android/chrome_feature_list.h"
103 #else // OS_ANDROID 103 #else // OS_ANDROID
104 #include "ui/message_center/message_center_switches.h" 104 #include "ui/message_center/message_center_switches.h"
105 #endif // OS_ANDROID 105 #endif // OS_ANDROID
106 106
107 #if defined(OS_CHROMEOS) 107 #if defined(OS_CHROMEOS)
108 #include "chromeos/chromeos_switches.h" 108 #include "chromeos/chromeos_switches.h"
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 flag_descriptions::kSmoothScrollingDescription, 984 flag_descriptions::kSmoothScrollingDescription,
985 // Mac has a separate implementation with its own setting to disable. 985 // Mac has a separate implementation with its own setting to disable.
986 kOsLinux | kOsCrOS | kOsWin | kOsAndroid, 986 kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
987 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling, 987 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling,
988 switches::kDisableSmoothScrolling)}, 988 switches::kDisableSmoothScrolling)},
989 #if defined(USE_AURA) 989 #if defined(USE_AURA)
990 {"overlay-scrollbars", flag_descriptions::kOverlayScrollbarsName, 990 {"overlay-scrollbars", flag_descriptions::kOverlayScrollbarsName,
991 flag_descriptions::kOverlayScrollbarsDescription, 991 flag_descriptions::kOverlayScrollbarsDescription,
992 // Uses the system preference on Mac (a different implementation). 992 // Uses the system preference on Mac (a different implementation).
993 // On Android, this is always enabled. 993 // On Android, this is always enabled.
994 kOsAura, 994 kOsAura, FEATURE_VALUE_TYPE(features::kOverlayScrollbar)},
995 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar,
996 switches::kDisableOverlayScrollbar)},
997 #endif // USE_AURA 995 #endif // USE_AURA
998 { // See http://crbug.com/120416 for how to remove this flag. 996 { // See http://crbug.com/120416 for how to remove this flag.
999 "save-page-as-mhtml", flag_descriptions::kSavePageAsMhtmlName, 997 "save-page-as-mhtml", flag_descriptions::kSavePageAsMhtmlName,
1000 flag_descriptions::kSavePageAsMhtmlDescription, kOsMac | kOsWin | kOsLinux, 998 flag_descriptions::kSavePageAsMhtmlDescription, kOsMac | kOsWin | kOsLinux,
1001 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)}, 999 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)},
1002 {"mhtml-generator-option", flag_descriptions::kMhtmlGeneratorOptionName, 1000 {"mhtml-generator-option", flag_descriptions::kMhtmlGeneratorOptionName,
1003 flag_descriptions::kMhtmlGeneratorOptionDescription, 1001 flag_descriptions::kMhtmlGeneratorOptionDescription,
1004 kOsMac | kOsWin | kOsLinux, 1002 kOsMac | kOsWin | kOsLinux,
1005 MULTI_VALUE_TYPE(kMHTMLGeneratorOptionChoices)}, 1003 MULTI_VALUE_TYPE(kMHTMLGeneratorOptionChoices)},
1006 {"enable-quic", flag_descriptions::kQuicName, 1004 {"enable-quic", flag_descriptions::kQuicName,
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 #if defined(USE_ASH) 2599 #if defined(USE_ASH)
2602 {"ash-enable-smooth-screen-rotation", 2600 {"ash-enable-smooth-screen-rotation",
2603 flag_descriptions::kAshEnableSmoothScreenRotationName, 2601 flag_descriptions::kAshEnableSmoothScreenRotationName,
2604 flag_descriptions::kAshEnableSmoothScreenRotationDescription, kOsCrOS, 2602 flag_descriptions::kAshEnableSmoothScreenRotationDescription, kOsCrOS,
2605 SINGLE_VALUE_TYPE(ash::switches::kAshEnableSmoothScreenRotation)}, 2603 SINGLE_VALUE_TYPE(ash::switches::kAshEnableSmoothScreenRotation)},
2606 #endif // defined(USE_ASH) 2604 #endif // defined(USE_ASH)
2607 2605
2608 #if defined(OS_CHROMEOS) 2606 #if defined(OS_CHROMEOS)
2609 {"enable-zip-archiver-on-file-manager", 2607 {"enable-zip-archiver-on-file-manager",
2610 flag_descriptions::kEnableZipArchiverOnFileManagerName, 2608 flag_descriptions::kEnableZipArchiverOnFileManagerName,
2611 flag_descriptions::kEnableZipArchiverOnFileManagerDescription, 2609 flag_descriptions::kEnableZipArchiverOnFileManagerDescription, kOsCrOS,
2612 kOsCrOS, 2610 SINGLE_VALUE_TYPE(chromeos::switches::kEnableZipArchiverOnFileManager)},
2613 SINGLE_VALUE_TYPE(
2614 chromeos::switches::kEnableZipArchiverOnFileManager)},
2615 #endif // OS_CHROMEOS 2611 #endif // OS_CHROMEOS
2616 2612
2617 #if defined(OS_ANDROID) 2613 #if defined(OS_ANDROID)
2618 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName, 2614 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName,
2619 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid, 2615 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid,
2620 FEATURE_VALUE_TYPE(features::kCopylessPaste)}, 2616 FEATURE_VALUE_TYPE(features::kCopylessPaste)},
2621 #endif 2617 #endif
2622 2618
2623 // NOTE: Adding new command-line switches requires adding corresponding 2619 // NOTE: Adding new command-line switches requires adding corresponding
2624 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2620 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2825 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2830 2826
2831 const FeatureEntry* GetFeatureEntries(size_t* count) { 2827 const FeatureEntry* GetFeatureEntries(size_t* count) {
2832 *count = arraysize(kFeatureEntries); 2828 *count = arraysize(kFeatureEntries);
2833 return kFeatureEntries; 2829 return kFeatureEntries;
2834 } 2830 }
2835 2831
2836 } // namespace testing 2832 } // namespace testing
2837 2833
2838 } // namespace about_flags 2834 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698