| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "ui/display/display_switches.h" | 72 #include "ui/display/display_switches.h" |
| 73 #include "ui/events/event_switches.h" | 73 #include "ui/events/event_switches.h" |
| 74 #include "ui/gfx/switches.h" | 74 #include "ui/gfx/switches.h" |
| 75 #include "ui/gl/gl_switches.h" | 75 #include "ui/gl/gl_switches.h" |
| 76 #include "ui/keyboard/keyboard_switches.h" | 76 #include "ui/keyboard/keyboard_switches.h" |
| 77 #include "ui/native_theme/native_theme_switches.h" | 77 #include "ui/native_theme/native_theme_switches.h" |
| 78 #include "ui/views/views_switches.h" | 78 #include "ui/views/views_switches.h" |
| 79 | 79 |
| 80 #if defined(OS_ANDROID) | 80 #if defined(OS_ANDROID) |
| 81 #include "chrome/browser/android/chrome_feature_list.h" | 81 #include "chrome/browser/android/chrome_feature_list.h" |
| 82 #include "components/autofill/core/browser/autofill_experiments.h" |
| 82 #else | 83 #else |
| 83 #include "ui/message_center/message_center_switches.h" | 84 #include "ui/message_center/message_center_switches.h" |
| 84 #endif | 85 #endif |
| 85 | 86 |
| 86 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
| 87 #include "chromeos/chromeos_switches.h" | 88 #include "chromeos/chromeos_switches.h" |
| 88 #include "third_party/cros_system_api/switches/chrome_switches.h" | 89 #include "third_party/cros_system_api/switches/chrome_switches.h" |
| 89 #endif | 90 #endif |
| 90 | 91 |
| 91 #if defined(OS_MACOSX) | 92 #if defined(OS_MACOSX) |
| (...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 IDS_FLAGS_QUICK_UNLOCK_PIN_DESCRIPTION, kOsCrOS, | 2037 IDS_FLAGS_QUICK_UNLOCK_PIN_DESCRIPTION, kOsCrOS, |
| 2037 FEATURE_VALUE_TYPE(features::kQuickUnlockPin)}, | 2038 FEATURE_VALUE_TYPE(features::kQuickUnlockPin)}, |
| 2038 #endif // defined(OS_CHROMEOS) | 2039 #endif // defined(OS_CHROMEOS) |
| 2039 #if defined(OS_ANDROID) | 2040 #if defined(OS_ANDROID) |
| 2040 {"multi-instance-merge-tabs", IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_NAME, | 2041 {"multi-instance-merge-tabs", IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_NAME, |
| 2041 IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_DESCRIPTION, kOsAndroid, | 2042 IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_DESCRIPTION, kOsAndroid, |
| 2042 SINGLE_VALUE_TYPE(switches::kMultiInstanceMergeTabs)}, | 2043 SINGLE_VALUE_TYPE(switches::kMultiInstanceMergeTabs)}, |
| 2043 {"enable-web-payments", IDS_FLAGS_ENABLE_WEB_PAYMENTS_NAME, | 2044 {"enable-web-payments", IDS_FLAGS_ENABLE_WEB_PAYMENTS_NAME, |
| 2044 IDS_FLAGS_ENABLE_WEB_PAYMENTS_DESCRIPTION, kOsAndroid, | 2045 IDS_FLAGS_ENABLE_WEB_PAYMENTS_DESCRIPTION, kOsAndroid, |
| 2045 FEATURE_VALUE_TYPE(features::kWebPayments)}, | 2046 FEATURE_VALUE_TYPE(features::kWebPayments)}, |
| 2047 {"enable-credit-card-signin-promo", |
| 2048 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_NAME, |
| 2049 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_DESCRIPTION, kOsAndroid, |
| 2050 FEATURE_VALUE_TYPE(autofill::kAutofillCreditCardSigninPromo)}, |
| 2046 #endif // defined(OS_ANDROID) | 2051 #endif // defined(OS_ANDROID) |
| 2047 // NOTE: Adding new command-line switches requires adding corresponding | 2052 // NOTE: Adding new command-line switches requires adding corresponding |
| 2048 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2053 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2049 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2054 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2050 }; | 2055 }; |
| 2051 | 2056 |
| 2052 class FlagsStateSingleton { | 2057 class FlagsStateSingleton { |
| 2053 public: | 2058 public: |
| 2054 FlagsStateSingleton() | 2059 FlagsStateSingleton() |
| 2055 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2060 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2227 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2232 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2228 | 2233 |
| 2229 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2234 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2230 *count = arraysize(kFeatureEntries); | 2235 *count = arraysize(kFeatureEntries); |
| 2231 return kFeatureEntries; | 2236 return kFeatureEntries; |
| 2232 } | 2237 } |
| 2233 | 2238 |
| 2234 } // namespace testing | 2239 } // namespace testing |
| 2235 | 2240 |
| 2236 } // namespace about_flags | 2241 } // namespace about_flags |
| OLD | NEW |