| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // so by default we want to avoid debugging that. | 178 // so by default we want to avoid debugging that. |
| 179 // NOTE: As the default value must be the empty string, the mask excluding | 179 // NOTE: As the default value must be the empty string, the mask excluding |
| 180 // the PNaCl translator and secure shell is substituted elsewhere. | 180 // the PNaCl translator and secure shell is substituted elsewhere. |
| 181 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, | 181 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 182 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, | 182 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
| 183 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, | 183 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 184 switches::kNaClDebugMask, "*://*/*debug.nmf" } | 184 switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 185 }; | 185 }; |
| 186 #endif | 186 #endif |
| 187 | 187 |
| 188 const FeatureEntry::Choice kPassiveListenersChoices[] = { |
| 189 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 190 {IDS_FLAGS_PASSIVE_EVENT_LISTENER_DOCUMENT_TRUE, |
| 191 switches::kPassiveListenersDefault, "documentonlytrue"}, |
| 192 {IDS_FLAGS_PASSIVE_EVENT_LISTENER_TRUE, switches::kPassiveListenersDefault, |
| 193 "true"}, |
| 194 {IDS_FLAGS_PASSIVE_EVENT_LISTENER_FORCE_ALL_TRUE, |
| 195 switches::kPassiveListenersDefault, "forcealltrue"}, |
| 196 }; |
| 197 |
| 188 const FeatureEntry::Choice kMarkNonSecureAsChoices[] = { | 198 const FeatureEntry::Choice kMarkNonSecureAsChoices[] = { |
| 189 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 199 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 190 {IDS_MARK_NON_SECURE_AS_NEUTRAL, security_state::switches::kMarkNonSecureAs, | 200 {IDS_MARK_NON_SECURE_AS_NEUTRAL, security_state::switches::kMarkNonSecureAs, |
| 191 security_state::switches::kMarkNonSecureAsNeutral}, | 201 security_state::switches::kMarkNonSecureAsNeutral}, |
| 192 {IDS_MARK_NON_SECURE_AS_NON_SECURE, | 202 {IDS_MARK_NON_SECURE_AS_NON_SECURE, |
| 193 security_state::switches::kMarkNonSecureAs, | 203 security_state::switches::kMarkNonSecureAs, |
| 194 security_state::switches::kMarkNonSecureAsNonSecure}}; | 204 security_state::switches::kMarkNonSecureAsNonSecure}}; |
| 195 | 205 |
| 196 const FeatureEntry::Choice kDataReductionProxyLoFiChoices[] = { | 206 const FeatureEntry::Choice kDataReductionProxyLoFiChoices[] = { |
| 197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 207 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_DESCRIPTION, kOsAndroid, | 1870 IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_DESCRIPTION, kOsAndroid, |
| 1861 FEATURE_VALUE_TYPE(chrome::android::kMediaStyleNotification)}, | 1871 FEATURE_VALUE_TYPE(chrome::android::kMediaStyleNotification)}, |
| 1862 {"important-sites-in-cbd", IDS_FLAGS_IMPORTANT_SITES_IN_CBD_NAME, | 1872 {"important-sites-in-cbd", IDS_FLAGS_IMPORTANT_SITES_IN_CBD_NAME, |
| 1863 IDS_FLAGS_IMPORTANT_SITES_IN_CBD_DESCRIPTION, kOsAndroid, | 1873 IDS_FLAGS_IMPORTANT_SITES_IN_CBD_DESCRIPTION, kOsAndroid, |
| 1864 FEATURE_VALUE_TYPE(chrome::android::kImportantSitesInCBD)}, | 1874 FEATURE_VALUE_TYPE(chrome::android::kImportantSitesInCBD)}, |
| 1865 #endif | 1875 #endif |
| 1866 {"enable-pointer-events", // FLAGS:RECORD_UMA | 1876 {"enable-pointer-events", // FLAGS:RECORD_UMA |
| 1867 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_NAME, | 1877 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_NAME, |
| 1868 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_DESCRIPTION, kOsAll, | 1878 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_DESCRIPTION, kOsAll, |
| 1869 FEATURE_VALUE_TYPE(features::kPointerEvents)}, | 1879 FEATURE_VALUE_TYPE(features::kPointerEvents)}, |
| 1880 {"passive-listener-default", // FLAGS:RECORD_UMA |
| 1881 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_NAME, |
| 1882 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_DESCRIPTION, kOsAll, |
| 1883 MULTI_VALUE_TYPE(kPassiveListenersChoices)}, |
| 1884 |
| 1870 // NOTE: Adding new command-line switches requires adding corresponding | 1885 // NOTE: Adding new command-line switches requires adding corresponding |
| 1871 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 1886 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1872 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 1887 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 1873 }; | 1888 }; |
| 1874 | 1889 |
| 1875 class FlagsStateSingleton { | 1890 class FlagsStateSingleton { |
| 1876 public: | 1891 public: |
| 1877 FlagsStateSingleton() | 1892 FlagsStateSingleton() |
| 1878 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 1893 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| 1879 ~FlagsStateSingleton() {} | 1894 ~FlagsStateSingleton() {} |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2074 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2060 | 2075 |
| 2061 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2076 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2062 *count = arraysize(kFeatureEntries); | 2077 *count = arraysize(kFeatureEntries); |
| 2063 return kFeatureEntries; | 2078 return kFeatureEntries; |
| 2064 } | 2079 } |
| 2065 | 2080 |
| 2066 } // namespace testing | 2081 } // namespace testing |
| 2067 | 2082 |
| 2068 } // namespace about_flags | 2083 } // namespace about_flags |
| OLD | NEW |