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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 #if defined(OS_ANDROID) | 514 #if defined(OS_ANDROID) |
515 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = { | 515 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = { |
516 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 516 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
517 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS, | 517 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS, |
518 switches::kEnableOfflinePagesAsBookmarks, ""}, | 518 switches::kEnableOfflinePagesAsBookmarks, ""}, |
519 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES, | 519 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES, |
520 switches::kEnableOfflinePagesAsSavedPages, ""}, | 520 switches::kEnableOfflinePagesAsSavedPages, ""}, |
521 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages, | 521 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages, |
522 ""}, | 522 ""}, |
523 }; | 523 }; |
| 524 |
| 525 const FeatureEntry::Choice kHerbPrototypeChoices[] = { |
| 526 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", ""}, |
| 527 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE, switches::kHerbFlavor, "anise"}, |
| 528 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL, switches::kHerbFlavor, "basil"}, |
| 529 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE, switches::kHerbFlavor, "chive"}, |
| 530 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_DILL, switches::kHerbFlavor, "dill"}, |
| 531 }; |
524 #endif // defined(OS_ANDROID) | 532 #endif // defined(OS_ANDROID) |
525 | 533 |
526 // RECORDING USER METRICS FOR FLAGS: | 534 // RECORDING USER METRICS FOR FLAGS: |
527 // ----------------------------------------------------------------------------- | 535 // ----------------------------------------------------------------------------- |
528 // The first line of the entry is the internal name. If you'd like to gather | 536 // The first line of the entry is the internal name. If you'd like to gather |
529 // statistics about the usage of your flag, you should append a marker comment | 537 // statistics about the usage of your flag, you should append a marker comment |
530 // to the end of the feature name, like so: | 538 // to the end of the feature name, like so: |
531 // "my-special-feature", // FLAGS:RECORD_UMA | 539 // "my-special-feature", // FLAGS:RECORD_UMA |
532 // | 540 // |
533 // After doing that, run | 541 // After doing that, run |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2045 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) | 2053 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) |
2046 {"enable-autofill-credit-card-upload", | 2054 {"enable-autofill-credit-card-upload", |
2047 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_NAME, | 2055 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_NAME, |
2048 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_DESCRIPTION, | 2056 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_DESCRIPTION, |
2049 kOsCrOS | kOsWin | kOsLinux | kOsAndroid, | 2057 kOsCrOS | kOsWin | kOsLinux | kOsAndroid, |
2050 ENABLE_DISABLE_VALUE_TYPE( | 2058 ENABLE_DISABLE_VALUE_TYPE( |
2051 autofill::switches::kEnableOfferUploadCreditCards, | 2059 autofill::switches::kEnableOfferUploadCreditCards, |
2052 autofill::switches::kDisableOfferUploadCreditCards)}, | 2060 autofill::switches::kDisableOfferUploadCreditCards)}, |
2053 #endif // defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) | 2061 #endif // defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) |
2054 #if defined(OS_ANDROID) | 2062 #if defined(OS_ANDROID) |
| 2063 {"herb-prototype-choices", |
| 2064 IDS_FLAGS_HERB_PROTOTYPE_CHOICES_NAME, |
| 2065 IDS_FLAGS_HERB_PROTOTYPE_CHOICES_DESCRIPTION, kOsAndroid, |
| 2066 MULTI_VALUE_TYPE(kHerbPrototypeChoices)}, |
2055 {"enable-tab-switcher-in-document-mode", | 2067 {"enable-tab-switcher-in-document-mode", |
2056 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME, | 2068 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME, |
2057 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid, | 2069 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid, |
2058 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)}, | 2070 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)}, |
2059 #endif // OS_ANDROID | 2071 #endif // OS_ANDROID |
2060 {"enable-md-history", | 2072 {"enable-md-history", |
2061 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME, | 2073 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME, |
2062 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION, | 2074 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION, |
2063 kOsDesktop | kOsAndroid, | 2075 kOsDesktop | kOsAndroid, |
2064 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)}, | 2076 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)}, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2189 } | 2201 } |
2190 // enable-data-reduction-proxy-carrier-test is only available for Chromium | 2202 // enable-data-reduction-proxy-carrier-test is only available for Chromium |
2191 // builds and the Canary/Dev channel. | 2203 // builds and the Canary/Dev channel. |
2192 if (!strcmp("enable-data-reduction-proxy-carrier-test", | 2204 if (!strcmp("enable-data-reduction-proxy-carrier-test", |
2193 entry.internal_name) && | 2205 entry.internal_name) && |
2194 channel != version_info::Channel::DEV && | 2206 channel != version_info::Channel::DEV && |
2195 channel != version_info::Channel::CANARY && | 2207 channel != version_info::Channel::CANARY && |
2196 channel != version_info::Channel::UNKNOWN) { | 2208 channel != version_info::Channel::UNKNOWN) { |
2197 return true; | 2209 return true; |
2198 } | 2210 } |
| 2211 // enable-herb-prototype is only available for local, Canary, and Dev channel |
| 2212 // builds. |
| 2213 if (!strcmp(switches::kHerbFlavor, entry.internal_name) && |
| 2214 channel != version_info::Channel::DEV && |
| 2215 channel != version_info::Channel::CANARY && |
| 2216 channel != version_info::Channel::UNKNOWN) { |
| 2217 return true; |
| 2218 } |
2199 // enable-tab-switcher-in-document-mode is only available for Chromium | 2219 // enable-tab-switcher-in-document-mode is only available for Chromium |
2200 // builds and the Canary channel. | 2220 // builds and the Canary channel. |
2201 if (!strcmp("enable-tab-switcher-in-document-mode", | 2221 if (!strcmp("enable-tab-switcher-in-document-mode", |
2202 entry.internal_name) && | 2222 entry.internal_name) && |
2203 channel != version_info::Channel::CANARY && | 2223 channel != version_info::Channel::CANARY && |
2204 channel != version_info::Channel::UNKNOWN) { | 2224 channel != version_info::Channel::UNKNOWN) { |
2205 return true; | 2225 return true; |
2206 } | 2226 } |
2207 #endif | 2227 #endif |
2208 | 2228 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2374 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
2355 | 2375 |
2356 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2376 const FeatureEntry* GetFeatureEntries(size_t* count) { |
2357 *count = arraysize(kFeatureEntries); | 2377 *count = arraysize(kFeatureEntries); |
2358 return kFeatureEntries; | 2378 return kFeatureEntries; |
2359 } | 2379 } |
2360 | 2380 |
2361 } // namespace testing | 2381 } // namespace testing |
2362 | 2382 |
2363 } // namespace about_flags | 2383 } // namespace about_flags |
OLD | NEW |