File: search_engines_switches.h

package info (click to toggle)
chromium 140.0.7339.185-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,193,740 kB
  • sloc: cpp: 35,093,945; ansic: 7,161,670; javascript: 4,199,694; python: 1,441,797; asm: 949,904; xml: 747,515; pascal: 187,748; perl: 88,691; sh: 88,248; objc: 79,953; sql: 52,714; cs: 44,599; fortran: 24,137; makefile: 22,114; tcl: 15,277; php: 13,980; yacc: 9,000; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (93 lines) | stat: -rw-r--r-- 3,719 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 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;

#if BUILDFLAG(IS_ANDROID)
// Enables showing a snackbar when users change their default search engine in
// Android.
COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES)
BASE_DECLARE_FEATURE(kClaySnackbar);
// Suppresses the default browser promo if the user has already completed the
// OS-level default browser choice.
COMPONENT_EXPORT(SEARCH_ENGINES_SWITCHES)
BASE_DECLARE_FEATURE(kSuppressDefaultBrowserPromoIfChoiceSet);
#endif

// 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);

}  // namespace switches

#endif  // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_SWITCHES_H_