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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 {IDS_FLAGS_WEBRTC_HW_ENCODING_ALL, switches::kDisableWebRtcHWEncoding, ""}, | 607 {IDS_FLAGS_WEBRTC_HW_ENCODING_ALL, switches::kDisableWebRtcHWEncoding, ""}, |
608 {IDS_FLAGS_WEBRTC_HW_ENCODING_VPX, switches::kDisableWebRtcHWEncoding, | 608 {IDS_FLAGS_WEBRTC_HW_ENCODING_VPX, switches::kDisableWebRtcHWEncoding, |
609 switches::kDisableWebRtcHWEncodingVPx}, | 609 switches::kDisableWebRtcHWEncodingVPx}, |
610 {IDS_FLAGS_WEBRTC_HW_ENCODING_H264, switches::kDisableWebRtcHWEncoding, | 610 {IDS_FLAGS_WEBRTC_HW_ENCODING_H264, switches::kDisableWebRtcHWEncoding, |
611 switches::kDisableWebRtcHWEncodingH264}, | 611 switches::kDisableWebRtcHWEncodingH264}, |
612 {IDS_FLAGS_WEBRTC_HW_ENCODING_NONE, switches::kDisableWebRtcHWEncoding, | 612 {IDS_FLAGS_WEBRTC_HW_ENCODING_NONE, switches::kDisableWebRtcHWEncoding, |
613 switches::kDisableWebRtcHWEncodingNone}, | 613 switches::kDisableWebRtcHWEncodingNone}, |
614 }; | 614 }; |
615 #endif // ENABLE_WEBRTC | 615 #endif // ENABLE_WEBRTC |
616 | 616 |
| 617 #if !defined(OS_ANDROID) |
| 618 const FeatureEntry::Choice kEnableDefaultMediaSessionChoices[] = { |
| 619 {IDS_FLAGS_ENABLE_DEFAULT_MEDIA_SESSION_DISABLED, "", ""}, |
| 620 {IDS_FLAGS_ENABLE_DEFAULT_MEDIA_SESSION_ENABLED, |
| 621 switches::kEnableDefaultMediaSession, ""}, |
| 622 #if defined(ENABLE_PLUGINS) |
| 623 {IDS_FLAGS_ENABLE_DEFAULT_MEDIA_SESSION_ENABLED_WITH_FLASH, |
| 624 switches::kEnableDefaultMediaSession, |
| 625 switches::kEnableDefaultMediaSessionWithFlash}, |
| 626 #endif // defined(ENABLE_PLUGINS) |
| 627 }; |
| 628 #endif // !defined(OS_ANDROID) |
| 629 |
617 // RECORDING USER METRICS FOR FLAGS: | 630 // RECORDING USER METRICS FOR FLAGS: |
618 // ----------------------------------------------------------------------------- | 631 // ----------------------------------------------------------------------------- |
619 // The first line of the entry is the internal name. | 632 // The first line of the entry is the internal name. |
620 // | 633 // |
621 // To add a new entry, add to the end of kFeatureEntries. There are two | 634 // To add a new entry, add to the end of kFeatureEntries. There are two |
622 // distinct types of entries: | 635 // distinct types of entries: |
623 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 636 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
624 // macro for this type supplying the command line to the macro. | 637 // macro for this type supplying the command line to the macro. |
625 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 638 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
626 // deactivated state for this lab (i.e. no command line option). To specify | 639 // deactivated state for this lab (i.e. no command line option). To specify |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 IDS_FLAGS_SECURITY_CHIP_DESCRIPTION, kOsDesktop, | 2057 IDS_FLAGS_SECURITY_CHIP_DESCRIPTION, kOsDesktop, |
2045 MULTI_VALUE_TYPE(kSecurityChipChoices)}, | 2058 MULTI_VALUE_TYPE(kSecurityChipChoices)}, |
2046 {"security-chip-animation", IDS_FLAGS_SECURITY_CHIP_ANIMATION_NAME, | 2059 {"security-chip-animation", IDS_FLAGS_SECURITY_CHIP_ANIMATION_NAME, |
2047 IDS_FLAGS_SECURITY_CHIP_ANIMATION_DESCRIPTION, kOsDesktop, | 2060 IDS_FLAGS_SECURITY_CHIP_ANIMATION_DESCRIPTION, kOsDesktop, |
2048 MULTI_VALUE_TYPE(kSecurityChipAnimationChoices)}, | 2061 MULTI_VALUE_TYPE(kSecurityChipAnimationChoices)}, |
2049 #if defined(OS_CHROMEOS) | 2062 #if defined(OS_CHROMEOS) |
2050 {"enumerate-audio-devices", IDS_FLAGS_ENABLE_ENUMERATING_AUDIO_DEVICES_NAME, | 2063 {"enumerate-audio-devices", IDS_FLAGS_ENABLE_ENUMERATING_AUDIO_DEVICES_NAME, |
2051 IDS_FLAGS_ENABLE_ENUMERATING_AUDIO_DEVICES_DESCRIPTION, kOsCrOS, | 2064 IDS_FLAGS_ENABLE_ENUMERATING_AUDIO_DEVICES_DESCRIPTION, kOsCrOS, |
2052 FEATURE_VALUE_TYPE(features::kEnumerateAudioDevices)}, | 2065 FEATURE_VALUE_TYPE(features::kEnumerateAudioDevices)}, |
2053 #endif // OS_CHROMEOS | 2066 #endif // OS_CHROMEOS |
2054 | 2067 #if !defined(OS_ANDROID) |
| 2068 {"enable-default-media-session", |
| 2069 IDS_FLAGS_ENABLE_DEFAULT_MEDIA_SESSION_NAME, |
| 2070 IDS_FLAGS_ENABLE_DEFAULT_MEDIA_SESSION_DESCRIPTION, kOsDesktop, |
| 2071 MULTI_VALUE_TYPE(kEnableDefaultMediaSessionChoices)}, |
| 2072 #endif // !defined(OS_ANDROID) |
2055 // NOTE: Adding new command-line switches requires adding corresponding | 2073 // NOTE: Adding new command-line switches requires adding corresponding |
2056 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2074 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2057 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2075 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2058 }; | 2076 }; |
2059 | 2077 |
2060 class FlagsStateSingleton { | 2078 class FlagsStateSingleton { |
2061 public: | 2079 public: |
2062 FlagsStateSingleton() | 2080 FlagsStateSingleton() |
2063 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2081 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
2064 ~FlagsStateSingleton() {} | 2082 ~FlagsStateSingleton() {} |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2271 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
2254 | 2272 |
2255 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2273 const FeatureEntry* GetFeatureEntries(size_t* count) { |
2256 *count = arraysize(kFeatureEntries); | 2274 *count = arraysize(kFeatureEntries); |
2257 return kFeatureEntries; | 2275 return kFeatureEntries; |
2258 } | 2276 } |
2259 | 2277 |
2260 } // namespace testing | 2278 } // namespace testing |
2261 | 2279 |
2262 } // namespace about_flags | 2280 } // namespace about_flags |
OLD | NEW |