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

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

Issue 2946693002: Use GN buildflags and features to configure account consistency (Closed)
Patch Set: Created 3 years, 6 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "components/ntp_tiles/constants.h" 59 #include "components/ntp_tiles/constants.h"
60 #include "components/ntp_tiles/switches.h" 60 #include "components/ntp_tiles/switches.h"
61 #include "components/offline_pages/core/offline_page_feature.h" 61 #include "components/offline_pages/core/offline_page_feature.h"
62 #include "components/omnibox/browser/omnibox_field_trial.h" 62 #include "components/omnibox/browser/omnibox_field_trial.h"
63 #include "components/omnibox/browser/omnibox_switches.h" 63 #include "components/omnibox/browser/omnibox_switches.h"
64 #include "components/password_manager/core/common/password_manager_features.h" 64 #include "components/password_manager/core/common/password_manager_features.h"
65 #include "components/previews/core/previews_features.h" 65 #include "components/previews/core/previews_features.h"
66 #include "components/proximity_auth/switches.h" 66 #include "components/proximity_auth/switches.h"
67 #include "components/security_state/core/security_state.h" 67 #include "components/security_state/core/security_state.h"
68 #include "components/security_state/core/switches.h" 68 #include "components/security_state/core/switches.h"
69 #include "components/signin/core/common/signin_features.h"
69 #include "components/signin/core/common/signin_switches.h" 70 #include "components/signin/core/common/signin_switches.h"
70 #include "components/spellcheck/common/spellcheck_features.h" 71 #include "components/spellcheck/common/spellcheck_features.h"
71 #include "components/spellcheck/common/spellcheck_switches.h" 72 #include "components/spellcheck/common/spellcheck_switches.h"
72 #include "components/spellcheck/spellcheck_build_features.h" 73 #include "components/spellcheck/spellcheck_build_features.h"
73 #include "components/ssl_config/ssl_config_switches.h" 74 #include "components/ssl_config/ssl_config_switches.h"
74 #include "components/suggestions/features.h" 75 #include "components/suggestions/features.h"
75 #include "components/sync/driver/sync_driver_switches.h" 76 #include "components/sync/driver/sync_driver_switches.h"
76 #include "components/tracing/common/tracing_switches.h" 77 #include "components/tracing/common/tracing_switches.h"
77 #include "components/translate/core/browser/translate_infobar_delegate.h" 78 #include "components/translate/core/browser/translate_infobar_delegate.h"
78 #include "components/translate/core/browser/translate_manager.h" 79 #include "components/translate/core/browser/translate_manager.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 299 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
299 {flag_descriptions::kDefaultTileHeightShort, switches::kDefaultTileHeight, 300 {flag_descriptions::kDefaultTileHeightShort, switches::kDefaultTileHeight,
300 "128"}, 301 "128"},
301 {flag_descriptions::kDefaultTileHeightTall, switches::kDefaultTileHeight, 302 {flag_descriptions::kDefaultTileHeightTall, switches::kDefaultTileHeight,
302 "256"}, 303 "256"},
303 {flag_descriptions::kDefaultTileHeightGrande, switches::kDefaultTileHeight, 304 {flag_descriptions::kDefaultTileHeightGrande, switches::kDefaultTileHeight,
304 "512"}, 305 "512"},
305 {flag_descriptions::kDefaultTileHeightVenti, switches::kDefaultTileHeight, 306 {flag_descriptions::kDefaultTileHeightVenti, switches::kDefaultTileHeight,
306 "1024"}}; 307 "1024"}};
307 308
308 #if !defined(OS_ANDROID) 309 #if !BUILDFLAG(ENABLE_MIRROR)
309 const FeatureEntry::Choice kAccountConsistencyChoices[] = { 310 const FeatureEntry::Choice kAccountConsistencyChoices[] = {
310 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 311 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
311 {flag_descriptions::kAccountConsistencyChoiceMirror, 312 {flag_descriptions::kAccountConsistencyChoiceMirror,
312 switches::kAccountConsistency, switches ::kAccountConsistencyMirror}, 313 switches::kAccountConsistency, switches ::kAccountConsistencyMirror},
314 #if BUILDFLAG(ENABLE_DICE_SUPPORT)
313 {flag_descriptions::kAccountConsistencyChoiceDice, 315 {flag_descriptions::kAccountConsistencyChoiceDice,
314 switches::kAccountConsistency, switches::kAccountConsistencyDice}, 316 switches::kAccountConsistency, switches::kAccountConsistencyDice},
317 #endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
315 }; 318 };
316 #endif 319 #endif // !BUILDFLAG(ENABLE_MIRROR)
317 320
318 const FeatureEntry::Choice kSimpleCacheBackendChoices[] = { 321 const FeatureEntry::Choice kSimpleCacheBackendChoices[] = {
319 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 322 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
320 {flags_ui::kGenericExperimentChoiceDisabled, 323 {flags_ui::kGenericExperimentChoiceDisabled,
321 switches::kUseSimpleCacheBackend, "off"}, 324 switches::kUseSimpleCacheBackend, "off"},
322 {flags_ui::kGenericExperimentChoiceEnabled, 325 {flags_ui::kGenericExperimentChoiceEnabled,
323 switches::kUseSimpleCacheBackend, "on"}}; 326 switches::kUseSimpleCacheBackend, "on"}};
324 327
325 #if defined(OS_ANDROID) 328 #if defined(OS_ANDROID)
326 const FeatureEntry::Choice kReaderModeHeuristicsChoices[] = { 329 const FeatureEntry::Choice kReaderModeHeuristicsChoices[] = {
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 {"enable-spelling-feedback-field-trial", 1675 {"enable-spelling-feedback-field-trial",
1673 flag_descriptions::kSpellingFeedbackFieldTrialName, 1676 flag_descriptions::kSpellingFeedbackFieldTrialName,
1674 flag_descriptions::kSpellingFeedbackFieldTrialDescription, kOsAll, 1677 flag_descriptions::kSpellingFeedbackFieldTrialDescription, kOsAll,
1675 SINGLE_VALUE_TYPE( 1678 SINGLE_VALUE_TYPE(
1676 spellcheck::switches::kEnableSpellingFeedbackFieldTrial)}, 1679 spellcheck::switches::kEnableSpellingFeedbackFieldTrial)},
1677 #endif // ENABLE_SPELLCHECK 1680 #endif // ENABLE_SPELLCHECK
1678 {"enable-webgl-draft-extensions", 1681 {"enable-webgl-draft-extensions",
1679 flag_descriptions::kWebglDraftExtensionsName, 1682 flag_descriptions::kWebglDraftExtensionsName,
1680 flag_descriptions::kWebglDraftExtensionsDescription, kOsAll, 1683 flag_descriptions::kWebglDraftExtensionsDescription, kOsAll,
1681 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)}, 1684 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)},
1682 #if !defined(OS_ANDROID) 1685 #if !BUILDFLAG(ENABLE_MIRROR)
1683 {"account-consistency", flag_descriptions::kAccountConsistencyName, 1686 {"account-consistency", flag_descriptions::kAccountConsistencyName,
1684 flag_descriptions::kAccountConsistencyDescription, 1687 flag_descriptions::kAccountConsistencyDescription, kOsAll,
1685 kOsWin | kOsLinux | kOsMac, MULTI_VALUE_TYPE(kAccountConsistencyChoices)}, 1688 MULTI_VALUE_TYPE(kAccountConsistencyChoices)},
1686 #endif 1689 #endif
1687 #if BUILDFLAG(ENABLE_APP_LIST) 1690 #if BUILDFLAG(ENABLE_APP_LIST)
1688 {"reset-app-list-install-state", 1691 {"reset-app-list-install-state",
1689 flag_descriptions::kResetAppListInstallStateName, 1692 flag_descriptions::kResetAppListInstallStateName,
1690 flag_descriptions::kResetAppListInstallStateDescription, 1693 flag_descriptions::kResetAppListInstallStateDescription,
1691 kOsMac | kOsWin | kOsLinux, 1694 kOsMac | kOsWin | kOsLinux,
1692 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState)}, 1695 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState)},
1693 #endif // BUILDFLAG(ENABLE_APP_LIST) 1696 #endif // BUILDFLAG(ENABLE_APP_LIST)
1694 #if defined(OS_ANDROID) 1697 #if defined(OS_ANDROID)
1695 {"enable-special-locale", flag_descriptions::kEnableSpecialLocaleName, 1698 {"enable-special-locale", flag_descriptions::kEnableSpecialLocaleName,
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
3307 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3310 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3308 3311
3309 const FeatureEntry* GetFeatureEntries(size_t* count) { 3312 const FeatureEntry* GetFeatureEntries(size_t* count) {
3310 *count = arraysize(kFeatureEntries); 3313 *count = arraysize(kFeatureEntries);
3311 return kFeatureEntries; 3314 return kFeatureEntries;
3312 } 3315 }
3313 3316
3314 } // namespace testing 3317 } // namespace testing
3315 3318
3316 } // namespace about_flags 3319 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698