| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "content/public/common/content_features.h" | 70 #include "content/public/common/content_features.h" |
| 71 #include "content/public/common/content_switches.h" | 71 #include "content/public/common/content_switches.h" |
| 72 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" | 72 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" |
| 73 #include "content/public/common/features.h" | 73 #include "content/public/common/features.h" |
| 74 #include "extensions/features/features.h" | 74 #include "extensions/features/features.h" |
| 75 #include "gin/public/gin_features.h" | 75 #include "gin/public/gin_features.h" |
| 76 #include "media/audio/audio_features.h" | 76 #include "media/audio/audio_features.h" |
| 77 #include "media/base/media_switches.h" | 77 #include "media/base/media_switches.h" |
| 78 #include "media/media_features.h" | 78 #include "media/media_features.h" |
| 79 #include "media/midi/midi_switches.h" | 79 #include "media/midi/midi_switches.h" |
| 80 #include "net/cert/cert_verify_proc_android.h" |
| 80 #include "ppapi/features/features.h" | 81 #include "ppapi/features/features.h" |
| 81 #include "printing/features/features.h" | 82 #include "printing/features/features.h" |
| 82 #include "ui/base/ui_base_switches.h" | 83 #include "ui/base/ui_base_switches.h" |
| 83 #include "ui/compositor/compositor_switches.h" | 84 #include "ui/compositor/compositor_switches.h" |
| 84 #include "ui/display/display_switches.h" | 85 #include "ui/display/display_switches.h" |
| 85 #include "ui/events/event_switches.h" | 86 #include "ui/events/event_switches.h" |
| 86 #include "ui/gfx/switches.h" | 87 #include "ui/gfx/switches.h" |
| 87 #include "ui/gl/gl_features.h" | 88 #include "ui/gl/gl_features.h" |
| 88 #include "ui/gl/gl_switches.h" | 89 #include "ui/gl/gl_switches.h" |
| 89 #include "ui/keyboard/keyboard_switches.h" | 90 #include "ui/keyboard/keyboard_switches.h" |
| (...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 #if defined(OS_ANDROID) | 1831 #if defined(OS_ANDROID) |
| 1831 {"content-suggestions-category-ranker", | 1832 {"content-suggestions-category-ranker", |
| 1832 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME, | 1833 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME, |
| 1833 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid, | 1834 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid, |
| 1834 FEATURE_WITH_VARIATIONS_VALUE_TYPE( | 1835 FEATURE_WITH_VARIATIONS_VALUE_TYPE( |
| 1835 ntp_snippets::kCategoryRanker, | 1836 ntp_snippets::kCategoryRanker, |
| 1836 kContentSuggestionsCategoryRankerFeatureVariations, | 1837 kContentSuggestionsCategoryRankerFeatureVariations, |
| 1837 ntp_snippets::kStudyName)}, | 1838 ntp_snippets::kStudyName)}, |
| 1838 {"override-ntp-suggestions-source", IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_NAME, | 1839 {"override-ntp-suggestions-source", IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_NAME, |
| 1839 IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_DESCRIPTION, kOsAndroid, | 1840 IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_DESCRIPTION, kOsAndroid, |
| 1840 FEATURE_WITH_VARIATIONS_VALUE_TYPE( | 1841 FEATURE_WITH_VARIATIONS_VALUE_TYPE(ntp_snippets::kContentSuggestionsSource, |
| 1841 ntp_snippets::kContentSuggestionsSource, | 1842 kNTPSnippetsFeatureVariations, |
| 1842 kNTPSnippetsFeatureVariations, | 1843 ntp_snippets::kStudyName)}, |
| 1843 ntp_snippets::kStudyName)}, | |
| 1844 {"enable-ntp-snippets-increased-visibility", | 1844 {"enable-ntp-snippets-increased-visibility", |
| 1845 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME, | 1845 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME, |
| 1846 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid, | 1846 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid, |
| 1847 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)}, | 1847 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)}, |
| 1848 {"enable-ntp-save-to-offline", IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_NAME, | 1848 {"enable-ntp-save-to-offline", IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_NAME, |
| 1849 IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_DESCRIPTION, kOsAndroid, | 1849 IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_DESCRIPTION, kOsAndroid, |
| 1850 FEATURE_VALUE_TYPE(ntp_snippets::kSaveToOfflineFeature)}, | 1850 FEATURE_VALUE_TYPE(ntp_snippets::kSaveToOfflineFeature)}, |
| 1851 {"enable-ntp-offline-badge", IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_NAME, | 1851 {"enable-ntp-offline-badge", IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_NAME, |
| 1852 IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_DESCRIPTION, kOsAndroid, | 1852 IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_DESCRIPTION, kOsAndroid, |
| 1853 FEATURE_VALUE_TYPE(ntp_snippets::kOfflineBadgeFeature)}, | 1853 FEATURE_VALUE_TYPE(ntp_snippets::kOfflineBadgeFeature)}, |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 {"gdi-text-printing", IDS_FLAGS_GDI_TEXT_PRINTING, | 2187 {"gdi-text-printing", IDS_FLAGS_GDI_TEXT_PRINTING, |
| 2188 IDS_FLAGS_GDI_TEXT_PRINTING_DESCRIPTION, kOsWin, | 2188 IDS_FLAGS_GDI_TEXT_PRINTING_DESCRIPTION, kOsWin, |
| 2189 FEATURE_VALUE_TYPE(features::kGdiTextPrinting)}, | 2189 FEATURE_VALUE_TYPE(features::kGdiTextPrinting)}, |
| 2190 {"postscript-printing", IDS_FLAGS_POSTSCRIPT_PRINTING, | 2190 {"postscript-printing", IDS_FLAGS_POSTSCRIPT_PRINTING, |
| 2191 IDS_FLAGS_POSTSCRIPT_PRINTING_DESCRIPTION, kOsWin, | 2191 IDS_FLAGS_POSTSCRIPT_PRINTING_DESCRIPTION, kOsWin, |
| 2192 FEATURE_VALUE_TYPE(features::kPostScriptPrinting)}, | 2192 FEATURE_VALUE_TYPE(features::kPostScriptPrinting)}, |
| 2193 #endif // defined(OS_WIN) | 2193 #endif // defined(OS_WIN) |
| 2194 | 2194 |
| 2195 #if defined(OS_CHROMEOS) | 2195 #if defined(OS_CHROMEOS) |
| 2196 {"show-arc-files-app", IDS_FLAGS_SHOW_ARC_FILES_APP_NAME, | 2196 {"show-arc-files-app", IDS_FLAGS_SHOW_ARC_FILES_APP_NAME, |
| 2197 IDS_FLAGS_SHOW_ARC_FILES_APP_DESCRIPTION, kOsCrOS, | 2197 IDS_FLAGS_SHOW_ARC_FILES_APP_DESCRIPTION, kOsCrOS, |
| 2198 FEATURE_VALUE_TYPE(arc::kShowArcFilesAppFeature)}, | 2198 FEATURE_VALUE_TYPE(arc::kShowArcFilesAppFeature)}, |
| 2199 #endif // defined(OS_CHROMEOS) | 2199 #endif // defined(OS_CHROMEOS) |
| 2200 | 2200 |
| 2201 #if defined(OS_ANDROID) |
| 2202 {"aia-fetching", IDS_FLAGS_AIA_FETCHING_NAME, |
| 2203 IDS_FLAGS_AIA_FETCHING_DESCRIPTION, kOsAndroid, |
| 2204 FEATURE_VALUE_TYPE(net::CertVerifyProcAndroid::kAIAFetchingFeature)}, |
| 2205 #endif |
| 2206 |
| 2201 // NOTE: Adding new command-line switches requires adding corresponding | 2207 // NOTE: Adding new command-line switches requires adding corresponding |
| 2202 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2208 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2203 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2209 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2204 }; | 2210 }; |
| 2205 | 2211 |
| 2206 class FlagsStateSingleton { | 2212 class FlagsStateSingleton { |
| 2207 public: | 2213 public: |
| 2208 FlagsStateSingleton() | 2214 FlagsStateSingleton() |
| 2209 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2215 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| 2210 ~FlagsStateSingleton() {} | 2216 ~FlagsStateSingleton() {} |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2399 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2405 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2400 | 2406 |
| 2401 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2407 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2402 *count = arraysize(kFeatureEntries); | 2408 *count = arraysize(kFeatureEntries); |
| 2403 return kFeatureEntries; | 2409 return kFeatureEntries; |
| 2404 } | 2410 } |
| 2405 | 2411 |
| 2406 } // namespace testing | 2412 } // namespace testing |
| 2407 | 2413 |
| 2408 } // namespace about_flags | 2414 } // namespace about_flags |
| OLD | NEW |