Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2201163003: [Autofill] Autofill CC signin promo: flag for all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 #include "base/values.h" 25 #include "base/values.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "cc/base/switches.h" 27 #include "cc/base/switches.h"
28 #include "chrome/common/channel_info.h" 28 #include "chrome/common/channel_info.h"
29 #include "chrome/common/chrome_content_client.h" 29 #include "chrome/common/chrome_content_client.h"
30 #include "chrome/common/chrome_features.h" 30 #include "chrome/common/chrome_features.h"
31 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
32 #include "chrome/common/features.h" 32 #include "chrome/common/features.h"
33 #include "chrome/grit/chromium_strings.h" 33 #include "chrome/grit/chromium_strings.h"
34 #include "chrome/grit/generated_resources.h" 34 #include "chrome/grit/generated_resources.h"
35 #include "components/autofill/core/browser/autofill_experiments.h"
35 #include "components/autofill/core/common/autofill_switches.h" 36 #include "components/autofill/core/common/autofill_switches.h"
36 #include "components/browser_sync/common/browser_sync_switches.h" 37 #include "components/browser_sync/common/browser_sync_switches.h"
37 #include "components/cloud_devices/common/cloud_devices_switches.h" 38 #include "components/cloud_devices/common/cloud_devices_switches.h"
38 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 39 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
39 #include "components/dom_distiller/core/dom_distiller_switches.h" 40 #include "components/dom_distiller/core/dom_distiller_switches.h"
40 #include "components/error_page/common/error_page_switches.h" 41 #include "components/error_page/common/error_page_switches.h"
41 #include "components/flags_ui/feature_entry_macros.h" 42 #include "components/flags_ui/feature_entry_macros.h"
42 #include "components/flags_ui/flags_storage.h" 43 #include "components/flags_ui/flags_storage.h"
43 #include "components/flags_ui/flags_ui_switches.h" 44 #include "components/flags_ui/flags_ui_switches.h"
44 #include "components/nacl/common/nacl_switches.h" 45 #include "components/nacl/common/nacl_switches.h"
(...skipping 27 matching lines...) Expand all
72 #include "ui/display/display_switches.h" 73 #include "ui/display/display_switches.h"
73 #include "ui/events/event_switches.h" 74 #include "ui/events/event_switches.h"
74 #include "ui/gfx/switches.h" 75 #include "ui/gfx/switches.h"
75 #include "ui/gl/gl_switches.h" 76 #include "ui/gl/gl_switches.h"
76 #include "ui/keyboard/keyboard_switches.h" 77 #include "ui/keyboard/keyboard_switches.h"
77 #include "ui/native_theme/native_theme_switches.h" 78 #include "ui/native_theme/native_theme_switches.h"
78 #include "ui/views/views_switches.h" 79 #include "ui/views/views_switches.h"
79 80
80 #if defined(OS_ANDROID) 81 #if defined(OS_ANDROID)
81 #include "chrome/browser/android/chrome_feature_list.h" 82 #include "chrome/browser/android/chrome_feature_list.h"
82 #include "components/autofill/core/browser/autofill_experiments.h"
83 #else 83 #else
84 #include "ui/message_center/message_center_switches.h" 84 #include "ui/message_center/message_center_switches.h"
85 #endif 85 #endif
86 86
87 #if defined(OS_CHROMEOS) 87 #if defined(OS_CHROMEOS)
88 #include "chromeos/chromeos_switches.h" 88 #include "chromeos/chromeos_switches.h"
89 #include "third_party/cros_system_api/switches/chrome_switches.h" 89 #include "third_party/cros_system_api/switches/chrome_switches.h"
90 #endif 90 #endif
91 91
92 #if defined(OS_MACOSX) 92 #if defined(OS_MACOSX)
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 #if defined(OS_ANDROID) 760 #if defined(OS_ANDROID)
761 {"contextual-search", IDS_FLAGS_CONTEXTUAL_SEARCH, 761 {"contextual-search", IDS_FLAGS_CONTEXTUAL_SEARCH,
762 IDS_FLAGS_CONTEXTUAL_SEARCH_DESCRIPTION, kOsAndroid, 762 IDS_FLAGS_CONTEXTUAL_SEARCH_DESCRIPTION, kOsAndroid,
763 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, 763 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
764 switches::kDisableContextualSearch)}, 764 switches::kDisableContextualSearch)},
765 #endif 765 #endif
766 {"show-autofill-type-predictions", 766 {"show-autofill-type-predictions",
767 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, 767 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
768 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, kOsAll, 768 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, kOsAll,
769 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)}, 769 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)},
770 {"enable-credit-card-signin-promo",
771 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_NAME,
772 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_DESCRIPTION, kOsAll,
773 FEATURE_VALUE_TYPE(autofill::kAutofillCreditCardSigninPromo)},
770 {"smooth-scrolling", // FLAGS:RECORD_UMA 774 {"smooth-scrolling", // FLAGS:RECORD_UMA
771 IDS_FLAGS_SMOOTH_SCROLLING_NAME, IDS_FLAGS_SMOOTH_SCROLLING_DESCRIPTION, 775 IDS_FLAGS_SMOOTH_SCROLLING_NAME, IDS_FLAGS_SMOOTH_SCROLLING_DESCRIPTION,
772 // Mac has a separate implementation with its own setting to disable. 776 // Mac has a separate implementation with its own setting to disable.
773 kOsLinux | kOsCrOS | kOsWin | kOsAndroid, 777 kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
774 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling, 778 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling,
775 switches::kDisableSmoothScrolling)}, 779 switches::kDisableSmoothScrolling)},
776 #if defined(USE_AURA) || defined(OS_LINUX) 780 #if defined(USE_AURA) || defined(OS_LINUX)
777 {"overlay-scrollbars", IDS_FLAGS_OVERLAY_SCROLLBARS_NAME, 781 {"overlay-scrollbars", IDS_FLAGS_OVERLAY_SCROLLBARS_NAME,
778 IDS_FLAGS_OVERLAY_SCROLLBARS_DESCRIPTION, 782 IDS_FLAGS_OVERLAY_SCROLLBARS_DESCRIPTION,
779 // Uses the system preference on Mac (a different implementation). 783 // Uses the system preference on Mac (a different implementation).
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 IDS_FLAGS_QUICK_UNLOCK_PIN_DESCRIPTION, kOsCrOS, 2041 IDS_FLAGS_QUICK_UNLOCK_PIN_DESCRIPTION, kOsCrOS,
2038 FEATURE_VALUE_TYPE(features::kQuickUnlockPin)}, 2042 FEATURE_VALUE_TYPE(features::kQuickUnlockPin)},
2039 #endif // defined(OS_CHROMEOS) 2043 #endif // defined(OS_CHROMEOS)
2040 #if defined(OS_ANDROID) 2044 #if defined(OS_ANDROID)
2041 {"multi-instance-merge-tabs", IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_NAME, 2045 {"multi-instance-merge-tabs", IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_NAME,
2042 IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_DESCRIPTION, kOsAndroid, 2046 IDS_FLAGS_MULTI_INSTANCE_MERGE_TABS_DESCRIPTION, kOsAndroid,
2043 SINGLE_VALUE_TYPE(switches::kMultiInstanceMergeTabs)}, 2047 SINGLE_VALUE_TYPE(switches::kMultiInstanceMergeTabs)},
2044 {"enable-web-payments", IDS_FLAGS_ENABLE_WEB_PAYMENTS_NAME, 2048 {"enable-web-payments", IDS_FLAGS_ENABLE_WEB_PAYMENTS_NAME,
2045 IDS_FLAGS_ENABLE_WEB_PAYMENTS_DESCRIPTION, kOsAndroid, 2049 IDS_FLAGS_ENABLE_WEB_PAYMENTS_DESCRIPTION, kOsAndroid,
2046 FEATURE_VALUE_TYPE(features::kWebPayments)}, 2050 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)},
2051 #endif // defined(OS_ANDROID) 2051 #endif // defined(OS_ANDROID)
2052 // NOTE: Adding new command-line switches requires adding corresponding 2052 // NOTE: Adding new command-line switches requires adding corresponding
2053 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2053 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2054 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2054 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2055 }; 2055 };
2056 2056
2057 class FlagsStateSingleton { 2057 class FlagsStateSingleton {
2058 public: 2058 public:
2059 FlagsStateSingleton() 2059 FlagsStateSingleton()
2060 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2060 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2232 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2233 2233
2234 const FeatureEntry* GetFeatureEntries(size_t* count) { 2234 const FeatureEntry* GetFeatureEntries(size_t* count) {
2235 *count = arraysize(kFeatureEntries); 2235 *count = arraysize(kFeatureEntries);
2236 return kFeatureEntries; 2236 return kFeatureEntries;
2237 } 2237 }
2238 2238
2239 } // namespace testing 2239 } // namespace testing
2240 2240
2241 } // namespace about_flags 2241 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698