| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 kAutofillCreditCardLastUsedDateFeatureVariationExpDate[] = { | 746 kAutofillCreditCardLastUsedDateFeatureVariationExpDate[] = { |
| 747 {"show_expiration_date", "true"}}; | 747 {"show_expiration_date", "true"}}; |
| 748 | 748 |
| 749 const FeatureEntry::FeatureVariation | 749 const FeatureEntry::FeatureVariation |
| 750 kAutofillCreditCardLastUsedDateFeatureVariations[] = { | 750 kAutofillCreditCardLastUsedDateFeatureVariations[] = { |
| 751 {"Display expiration date", | 751 {"Display expiration date", |
| 752 kAutofillCreditCardLastUsedDateFeatureVariationExpDate, | 752 kAutofillCreditCardLastUsedDateFeatureVariationExpDate, |
| 753 arraysize(kAutofillCreditCardLastUsedDateFeatureVariationExpDate), | 753 arraysize(kAutofillCreditCardLastUsedDateFeatureVariationExpDate), |
| 754 nullptr}}; | 754 nullptr}}; |
| 755 | 755 |
| 756 #if defined(OS_ANDROID) |
| 757 const FeatureEntry::FeatureParam kUseNewDoodleApiTest0[] = { |
| 758 {"doodle_override_url", |
| 759 "https://www.gstatic.com/chrome/ntp/doodle_test/android0.json"}}; |
| 760 const FeatureEntry::FeatureParam kUseNewDoodleApiTest1[] = { |
| 761 {"doodle_override_url", |
| 762 "https://www.gstatic.com/chrome/ntp/doodle_test/android1.json"}}; |
| 763 const FeatureEntry::FeatureParam kUseNewDoodleApiTest2[] = { |
| 764 {"doodle_override_url", |
| 765 "https://www.gstatic.com/chrome/ntp/doodle_test/android2.json"}}; |
| 766 const FeatureEntry::FeatureParam kUseNewDoodleApiTest3[] = { |
| 767 {"doodle_override_url", |
| 768 "https://www.gstatic.com/chrome/ntp/doodle_test/android3.json"}}; |
| 769 const FeatureEntry::FeatureParam kUseNewDoodleApiTest4[] = { |
| 770 {"doodle_override_url", |
| 771 "https://www.gstatic.com/chrome/ntp/doodle_test/android4.json"}}; |
| 772 const FeatureEntry::FeatureParam kUseNewDoodleApiTest5[] = { |
| 773 {"doodle_override_url", |
| 774 "https://www.gstatic.com/chrome/ntp/doodle_test/android5.json"}}; |
| 775 const FeatureEntry::FeatureParam kUseNewDoodleApiTest6[] = { |
| 776 {"doodle_override_url", |
| 777 "https://www.gstatic.com/chrome/ntp/doodle_test/android6.json"}}; |
| 778 const FeatureEntry::FeatureParam kUseNewDoodleApiTest7[] = { |
| 779 {"doodle_override_url", |
| 780 "https://www.gstatic.com/chrome/ntp/doodle_test/android7.json"}}; |
| 781 const FeatureEntry::FeatureParam kUseNewDoodleApiTest8[] = { |
| 782 {"doodle_override_url", |
| 783 "https://www.gstatic.com/chrome/ntp/doodle_test/android8.json"}}; |
| 784 |
| 785 const FeatureEntry::FeatureVariation kUseNewDoodleApiVariations[] = { |
| 786 {"(force test doodle 0)", kUseNewDoodleApiTest0, |
| 787 arraysize(kUseNewDoodleApiTest0), nullptr}, |
| 788 {"(force test doodle 1)", kUseNewDoodleApiTest1, |
| 789 arraysize(kUseNewDoodleApiTest1), nullptr}, |
| 790 {"(force test doodle 2)", kUseNewDoodleApiTest2, |
| 791 arraysize(kUseNewDoodleApiTest2), nullptr}, |
| 792 {"(force test doodle 3)", kUseNewDoodleApiTest3, |
| 793 arraysize(kUseNewDoodleApiTest3), nullptr}, |
| 794 {"(force test doodle 4)", kUseNewDoodleApiTest4, |
| 795 arraysize(kUseNewDoodleApiTest4), nullptr}, |
| 796 {"(force test doodle 5)", kUseNewDoodleApiTest5, |
| 797 arraysize(kUseNewDoodleApiTest5), nullptr}, |
| 798 {"(force test doodle 6)", kUseNewDoodleApiTest6, |
| 799 arraysize(kUseNewDoodleApiTest6), nullptr}, |
| 800 {"(force test doodle 7)", kUseNewDoodleApiTest7, |
| 801 arraysize(kUseNewDoodleApiTest7), nullptr}, |
| 802 {"(force test doodle 8)", kUseNewDoodleApiTest8, |
| 803 arraysize(kUseNewDoodleApiTest8), nullptr}}; |
| 804 #endif // OS_ANDROID |
| 805 |
| 756 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay[] = { | 806 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay[] = { |
| 757 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, | 807 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, |
| 758 {DelayNavigationThrottle::kParamDelayNavigationProbability, "1"}}; | 808 {DelayNavigationThrottle::kParamDelayNavigationProbability, "1"}}; |
| 759 | 809 |
| 760 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay25Percent[] = { | 810 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay25Percent[] = { |
| 761 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, | 811 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, |
| 762 {DelayNavigationThrottle::kParamDelayNavigationProbability, "0.25"}}; | 812 {DelayNavigationThrottle::kParamDelayNavigationProbability, "0.25"}}; |
| 763 | 813 |
| 764 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelayRandomize[] = { | 814 const FeatureEntry::FeatureParam kDelayNavigation5SecondDelayRandomize[] = { |
| 765 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, | 815 {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, |
| (...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 | 2547 |
| 2498 #if defined(OS_CHROMEOS) | 2548 #if defined(OS_CHROMEOS) |
| 2499 {"force-tablet-mode", flag_descriptions::kForceTabletModeName, | 2549 {"force-tablet-mode", flag_descriptions::kForceTabletModeName, |
| 2500 flag_descriptions::kForceTabletModeDescription, kOsCrOS, | 2550 flag_descriptions::kForceTabletModeDescription, kOsCrOS, |
| 2501 MULTI_VALUE_TYPE(kAshForceTabletModeChoices)}, | 2551 MULTI_VALUE_TYPE(kAshForceTabletModeChoices)}, |
| 2502 #endif // OS_CHROMEOS | 2552 #endif // OS_CHROMEOS |
| 2503 | 2553 |
| 2504 #if defined(OS_ANDROID) | 2554 #if defined(OS_ANDROID) |
| 2505 {"use-new-doodle-api", flag_descriptions::kUseNewDoodleApiName, | 2555 {"use-new-doodle-api", flag_descriptions::kUseNewDoodleApiName, |
| 2506 flag_descriptions::kUseNewDoodleApiDescription, kOsAndroid, | 2556 flag_descriptions::kUseNewDoodleApiDescription, kOsAndroid, |
| 2507 FEATURE_VALUE_TYPE(chrome::android::kUseNewDoodleApi)}, | 2557 FEATURE_WITH_PARAMS_VALUE_TYPE(chrome::android::kUseNewDoodleApi, |
| 2558 kUseNewDoodleApiVariations, |
| 2559 chrome::android::kUseNewDoodleApi.name)}, |
| 2508 #endif // OS_ANDROID | 2560 #endif // OS_ANDROID |
| 2509 | 2561 |
| 2510 {"delay-navigation", flag_descriptions::kDelayNavigationName, | 2562 {"delay-navigation", flag_descriptions::kDelayNavigationName, |
| 2511 flag_descriptions::kDelayNavigationDescription, kOsAll, | 2563 flag_descriptions::kDelayNavigationDescription, kOsAll, |
| 2512 FEATURE_WITH_PARAMS_VALUE_TYPE(kDelayNavigationFeature, | 2564 FEATURE_WITH_PARAMS_VALUE_TYPE(kDelayNavigationFeature, |
| 2513 kDelayNavigationFeatureVariations, | 2565 kDelayNavigationFeatureVariations, |
| 2514 "DelayNavigation")}, | 2566 "DelayNavigation")}, |
| 2515 | 2567 |
| 2516 #if defined(OS_ANDROID) | 2568 #if defined(OS_ANDROID) |
| 2517 {"enable-custom-context-menu", | 2569 {"enable-custom-context-menu", |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2721 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2773 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2722 | 2774 |
| 2723 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2775 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2724 *count = arraysize(kFeatureEntries); | 2776 *count = arraysize(kFeatureEntries); |
| 2725 return kFeatureEntries; | 2777 return kFeatureEntries; |
| 2726 } | 2778 } |
| 2727 | 2779 |
| 2728 } // namespace testing | 2780 } // namespace testing |
| 2729 | 2781 |
| 2730 } // namespace about_flags | 2782 } // namespace about_flags |
| OLD | NEW |