OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "ui/gfx/switches.h" | 60 #include "ui/gfx/switches.h" |
61 #include "ui/gl/gl_switches.h" | 61 #include "ui/gl/gl_switches.h" |
62 #include "ui/keyboard/keyboard_switches.h" | 62 #include "ui/keyboard/keyboard_switches.h" |
63 #include "ui/native_theme/native_theme_switches.h" | 63 #include "ui/native_theme/native_theme_switches.h" |
64 #include "ui/views/views_switches.h" | 64 #include "ui/views/views_switches.h" |
65 | 65 |
66 #if !defined(OS_ANDROID) | 66 #if !defined(OS_ANDROID) |
67 #include "ui/message_center/message_center_switches.h" | 67 #include "ui/message_center/message_center_switches.h" |
68 #endif | 68 #endif |
69 | 69 |
70 #if defined(USE_ASH) | |
71 #include "ash/ash_switches.h" | |
72 #endif | |
73 | |
74 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
75 #include "chromeos/chromeos_switches.h" | 71 #include "chromeos/chromeos_switches.h" |
76 #include "third_party/cros_system_api/switches/chrome_switches.h" | 72 #include "third_party/cros_system_api/switches/chrome_switches.h" |
77 #endif | 73 #endif |
78 | 74 |
| 75 #if defined(OS_WIN) |
| 76 #include "components/search_engines/desktop_search_win.h" |
| 77 #endif // defined(OS_WIN) |
| 78 |
79 #if defined(ENABLE_APP_LIST) | 79 #if defined(ENABLE_APP_LIST) |
80 #include "ui/app_list/app_list_switches.h" | 80 #include "ui/app_list/app_list_switches.h" |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(ENABLE_EXTENSIONS) | 83 #if defined(ENABLE_EXTENSIONS) |
84 #include "extensions/common/switches.h" | 84 #include "extensions/common/switches.h" |
85 #endif | 85 #endif |
86 | 86 |
87 #if defined(ENABLE_PRINT_PREVIEW) | 87 #if defined(ENABLE_PRINT_PREVIEW) |
88 #include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h" | 88 #include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h" |
89 #endif | 89 #endif |
90 | 90 |
| 91 #if defined(USE_ASH) |
| 92 #include "ash/ash_switches.h" |
| 93 #endif |
| 94 |
91 #if defined(USE_OZONE) | 95 #if defined(USE_OZONE) |
92 #include "ui/ozone/public/ozone_switches.h" | 96 #include "ui/ozone/public/ozone_switches.h" |
93 #endif | 97 #endif |
94 | 98 |
95 using flags_ui::FeatureEntry; | 99 using flags_ui::FeatureEntry; |
96 using flags_ui::kOsMac; | 100 using flags_ui::kOsMac; |
97 using flags_ui::kOsWin; | 101 using flags_ui::kOsWin; |
98 using flags_ui::kOsLinux; | 102 using flags_ui::kOsLinux; |
99 using flags_ui::kOsCrOS; | 103 using flags_ui::kOsCrOS; |
100 using flags_ui::kOsAndroid; | 104 using flags_ui::kOsAndroid; |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 {"enable-tab-switcher-in-document-mode", | 2075 {"enable-tab-switcher-in-document-mode", |
2072 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME, | 2076 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME, |
2073 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid, | 2077 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid, |
2074 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)}, | 2078 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)}, |
2075 #endif // OS_ANDROID | 2079 #endif // OS_ANDROID |
2076 {"enable-md-history", | 2080 {"enable-md-history", |
2077 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME, | 2081 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME, |
2078 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION, | 2082 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION, |
2079 kOsDesktop | kOsAndroid, | 2083 kOsDesktop | kOsAndroid, |
2080 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)}, | 2084 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)}, |
| 2085 #if defined(OS_WIN) |
| 2086 {"enable-windows-desktop-search-redirection", |
| 2087 IDS_FLAGS_WINDOWS_DESKTOP_SEARCH_REDIRECTION_NAME, |
| 2088 IDS_FLAGS_WINDOWS_DESKTOP_SEARCH_REDIRECTION_DESCRIPTION, |
| 2089 kOsWin, |
| 2090 FEATURE_VALUE_TYPE(kWindowsDesktopSearchRedirectionFeature)}, |
| 2091 #endif // defined(OS_WIN) |
2081 // NOTE: Adding new command-line switches requires adding corresponding | 2092 // NOTE: Adding new command-line switches requires adding corresponding |
2082 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2093 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2083 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2094 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2084 }; | 2095 }; |
2085 | 2096 |
2086 class FlagsStateSingleton { | 2097 class FlagsStateSingleton { |
2087 public: | 2098 public: |
2088 FlagsStateSingleton() | 2099 FlagsStateSingleton() |
2089 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2100 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
2090 ~FlagsStateSingleton() {} | 2101 ~FlagsStateSingleton() {} |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2284 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2295 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
2285 | 2296 |
2286 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2297 const FeatureEntry* GetFeatureEntries(size_t* count) { |
2287 *count = arraysize(kFeatureEntries); | 2298 *count = arraysize(kFeatureEntries); |
2288 return kFeatureEntries; | 2299 return kFeatureEntries; |
2289 } | 2300 } |
2290 | 2301 |
2291 } // namespace testing | 2302 } // namespace testing |
2292 | 2303 |
2293 } // namespace about_flags | 2304 } // namespace about_flags |
OLD | NEW |