diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-12 09:13:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-16 09:58:26 +0000 |
commit | 03561cae90f1d99b5c54b1ef3be69f10e882b25e (patch) | |
tree | cc5f0958e823c044e7ae51cc0117fe51432abe5e /chromium/components/security_state | |
parent | fa98118a45f7e169f8846086dc2c22c49a8ba310 (diff) | |
download | qtwebengine-chromium-03561cae90f1d99b5c54b1ef3be69f10e882b25e.tar.gz |
BASELINE: Update Chromium to 88.0.4324.208
Change-Id: I3ae87d23e4eff4b4a469685658740a213600c667
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/security_state')
4 files changed, 31 insertions, 1 deletions
diff --git a/chromium/components/security_state/core/features.cc b/chromium/components/security_state/core/features.cc index 9dcd8b9dc66..529d6dc23a2 100644 --- a/chromium/components/security_state/core/features.cc +++ b/chromium/components/security_state/core/features.cc @@ -21,5 +21,11 @@ const base::Feature kLegacyTLSWarnings{"LegacyTLSWarnings", const base::Feature kSafetyTipUI{"SafetyTip", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kSafetyTipUIForSimplifiedDomainDisplay{ + "SafetyTipForSimplifiedDomainDisplay", base::FEATURE_DISABLED_BY_DEFAULT}; + +const base::Feature kSafetyTipUIOnDelayedWarning{ + "SafetyTipUIOnDelayedWarning", base::FEATURE_DISABLED_BY_DEFAULT}; + } // namespace features } // namespace security_state diff --git a/chromium/components/security_state/core/features.h b/chromium/components/security_state/core/features.h index 59be9994918..cf1dc9085bc 100644 --- a/chromium/components/security_state/core/features.h +++ b/chromium/components/security_state/core/features.h @@ -44,6 +44,19 @@ extern const base::Feature kLegacyTLSWarnings; COMPONENT_EXPORT(SECURITY_STATE_FEATURES) extern const base::Feature kSafetyTipUI; +// This feature enables Safety Tip warnings on some types of lookalike sites, +// for the purposes of measuring Simplified Domain Display +// (https://crbug.com/1090393). It has similar behavior to kSafetyTipUI, but can +// be enabled independently in a separate experiment. +COMPONENT_EXPORT(SECURITY_STATE_FEATURES) +extern const base::Feature kSafetyTipUIForSimplifiedDomainDisplay; + +// This feature enables Safety Tip warnings on pages where there is a delayed +// Safe Browsing warning. Has no effect unless safe_browsing::kDelayedWarnings +// is also enabled. Can be enabled independently of kSafetyTipUI. +COMPONENT_EXPORT(SECURITY_STATE_FEATURES) +extern const base::Feature kSafetyTipUIOnDelayedWarning; + } // namespace features } // namespace security_state diff --git a/chromium/components/security_state/core/security_state.cc b/chromium/components/security_state/core/security_state.cc index af0b7c5e5fd..47328ccc688 100644 --- a/chromium/components/security_state/core/security_state.cc +++ b/chromium/components/security_state/core/security_state.cc @@ -84,7 +84,7 @@ std::string GetHistogramSuffixForSafetyTipStatus( // Sets |level| to the right value if status should be set. bool ShouldSetSecurityLevelFromSafetyTip(security_state::SafetyTipStatus status, SecurityLevel* level) { - if (!base::FeatureList::IsEnabled(security_state::features::kSafetyTipUI)) { + if (!IsSafetyTipUIFeatureEnabled()) { return false; } @@ -328,4 +328,11 @@ bool ShouldShowDangerTriangleForWarningLevel() { return true; } +bool IsSafetyTipUIFeatureEnabled() { + return base::FeatureList::IsEnabled(features::kSafetyTipUI) || + base::FeatureList::IsEnabled( + features::kSafetyTipUIForSimplifiedDomainDisplay) || + base::FeatureList::IsEnabled(features::kSafetyTipUIOnDelayedWarning); +} + } // namespace security_state diff --git a/chromium/components/security_state/core/security_state.h b/chromium/components/security_state/core/security_state.h index 134d6c7a3a1..d24f20a6019 100644 --- a/chromium/components/security_state/core/security_state.h +++ b/chromium/components/security_state/core/security_state.h @@ -269,6 +269,10 @@ bool IsSHA1InChain(const VisibleSecurityState& visible_security_state); // info to danger triangle as part of an experiment (crbug.com/997972). bool ShouldShowDangerTriangleForWarningLevel(); +// Returns true if Safety Tip UI should be shown because a relevant field trial +// is enabled. +bool IsSafetyTipUIFeatureEnabled(); + } // namespace security_state #endif // COMPONENTS_SECURITY_STATE_CORE_SECURITY_STATE_H_ |