| // Copyright 2014 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_SWITCHES_H_ |
| #define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_SWITCHES_H_ |
| |
| #include <string> |
| |
| #include "base/component_export.h" |
| #include "base/feature_list.h" |
| #include "base/metrics/field_trial_params.h" |
| #include "build/build_config.h" |
| |
| namespace switches { |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const char kExtraSearchQueryParams[]; |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const char kIgnoreNoFirstRunForSearchEngineChoiceScreen[]; |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const char kDisableSearchEngineChoiceScreen[]; |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const char kForceSearchEngineChoiceScreen[]; |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kInvalidateSearchEngineChoiceOnDeviceRestoreDetection); |
| |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const base::FeatureParam<bool> kInvalidateChoiceOnRestoreIsRetroactive; |
| |
| // The string that's passed to |
| // `switches::kSearchEngineChoiceTriggerRepromptParams` so that we don't |
| // reprompt users with the choice screen. |
| inline constexpr char kSearchEngineChoiceNoRepromptString[] = "NO_REPROMPT"; |
| |
| // Reprompt params for the search engine choice. |
| // This is a JSON dictionary where keys are country codes, and values are Chrome |
| // version strings. The wildcard country '*' represents all countries. |
| // When a specific country is specified, it takes precedence over the wildcard. |
| // |
| // Example: {"*": "2.0.0.0", "BE": "5.0.0.0"} |
| // This reprompts users in Belgium who made the choice strictly before version |
| // 5, and users in all other countries who made the choice strictly before |
| // version 2. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kSearchEngineChoiceTriggerReprompt); |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| extern const base::FeatureParam<std::string> |
| kSearchEngineChoiceTriggerRepromptParams; |
| |
| |
| // Whether state consistency across choice metadata and DSE pref state should |
| // be enforced. |
| // The presence of DSE choice metadata implies that a DSE choice was made, |
| // and in this case we also expect a DSE to be set in prefs. There are some |
| // flows that can cause the DSE pref to be cleared, like pref tampering |
| // detection. When this happens, we also wipe the DSE choice metadata to |
| // trigger a new choice prompt. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kWipeChoicePrefsOnMissingDefaultSearchEngine); |
| |
| // Kill switch to revert the fix of using assistedQueryStats for prefetch source |
| // component. See crbug.com/345275145. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kPrefetchParameterFix); |
| |
| // Kill switch to revert the fix of dropping searchbox stats (gs_lcrp) from |
| // prefetch requests. See crbug.com/350939001. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kRemoveSearchboxStatsParamFromPrefetchRequests); |
| |
| // Switch guarding TemplateURL syncing of untouched autogenerated search |
| // engines. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kDisableSyncAutogeneratedSearchEngines); |
| |
| // When enabled, resets the Default Search Engine if tampering is detected on |
| // startup. |
| COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES) |
| BASE_DECLARE_FEATURE(kResetTamperedDefaultSearchEngine); |
| |
| } // namespace switches |
| |
| #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_SWITCHES_H_ |