diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-07 13:12:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-09 10:02:59 +0000 |
commit | 33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (patch) | |
tree | f6af110909c79b2759136554f1143d8b0572af0a /chromium/components/security_state | |
parent | 7d2c5d177e9813077a621df8d18c0deda73099b3 (diff) | |
download | qtwebengine-chromium-33fc33aa94d4add0878ec30dc818e34e1dd3cc2a.tar.gz |
BASELINE: Update Chromium to 104.0.5112.120
Change-Id: I5d2726c2ab018d75d055739b6ba64317904f05bb
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438935
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/security_state')
7 files changed, 2 insertions, 91 deletions
diff --git a/chromium/components/security_state/content/android/BUILD.gn b/chromium/components/security_state/content/android/BUILD.gn index 787f71bf2c7..81ccc5ab73d 100644 --- a/chromium/components/security_state/content/android/BUILD.gn +++ b/chromium/components/security_state/content/android/BUILD.gn @@ -25,7 +25,8 @@ android_library("java") { "java/src/org/chromium/components/security_state/SecurityStateModel.java", ] deps = [ - "//base:base_java", + "//base:jni_java", + "//build/android:build_java", "//components/security_state/core:security_state_enums_java", "//content/public/android:content_java", "//third_party/androidx:androidx_annotation_annotation_java", diff --git a/chromium/components/security_state/core/BUILD.gn b/chromium/components/security_state/core/BUILD.gn index fde5a1014ec..a226b75a7cf 100644 --- a/chromium/components/security_state/core/BUILD.gn +++ b/chromium/components/security_state/core/BUILD.gn @@ -14,7 +14,6 @@ static_library("core") { ] public_deps = [ - ":features", "//base", "//net", "//url", @@ -40,21 +39,7 @@ source_set("unit_tests") { deps = [ ":core", - ":features", "//net:test_support", "//testing/gtest", ] } - -component("features") { - output_name = "security_state_features" - - defines = [ "IS_SECURITY_STATE_FEATURES_IMPL" ] - - sources = [ - "features.cc", - "features.h", - ] - - deps = [ "//base" ] -} diff --git a/chromium/components/security_state/core/features.cc b/chromium/components/security_state/core/features.cc deleted file mode 100644 index df385659b45..00000000000 --- a/chromium/components/security_state/core/features.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/security_state/core/features.h" - -namespace security_state { -namespace features { - -const base::Feature kSafetyTipUI{"SafetyTip", base::FEATURE_ENABLED_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 deleted file mode 100644 index 0388f38cade..00000000000 --- a/chromium/components/security_state/core/features.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_ -#define COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_ - -#include "base/component_export.h" -#include "base/feature_list.h" - -namespace security_state { -namespace features { - -// This feature enables Safety Tip warnings on possibly-risky sites. -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 - -#endif // COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_ diff --git a/chromium/components/security_state/core/security_state.cc b/chromium/components/security_state/core/security_state.cc index db8be156f6d..25ae1a7a26b 100644 --- a/chromium/components/security_state/core/security_state.cc +++ b/chromium/components/security_state/core/security_state.cc @@ -12,7 +12,6 @@ #include "base/metrics/field_trial_params.h" #include "base/metrics/histogram_macros.h" #include "build/build_config.h" -#include "components/security_state/core/features.h" #include "net/ssl/ssl_cipher_suite_names.h" #include "net/ssl/ssl_connection_status_flags.h" #include "services/network/public/cpp/is_potentially_trustworthy.h" @@ -67,10 +66,6 @@ std::string GetHistogramSuffixForSafetyTipStatus( // Sets |level| to the right value if status should be set. bool ShouldSetSecurityLevelFromSafetyTip(security_state::SafetyTipStatus status, SecurityLevel* level) { - if (!IsSafetyTipUIFeatureEnabled()) { - return false; - } - switch (status) { case security_state::SafetyTipStatus::kBadReputation: *level = security_state::NONE; @@ -292,11 +287,4 @@ bool IsSHA1InChain(const VisibleSecurityState& visible_security_state) { net::CERT_STATUS_SHA1_SIGNATURE_PRESENT); } -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 50feb1fa7ba..74d81acd079 100644 --- a/chromium/components/security_state/core/security_state.h +++ b/chromium/components/security_state/core/security_state.h @@ -248,10 +248,6 @@ std::string GetSafetyTipHistogramName(const std::string& prefix, bool IsSHA1InChain(const VisibleSecurityState& visible_security_state); -// 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_ diff --git a/chromium/components/security_state/core/security_state_unittest.cc b/chromium/components/security_state/core/security_state_unittest.cc index f3c1215bfda..866542fb4fc 100644 --- a/chromium/components/security_state/core/security_state_unittest.cc +++ b/chromium/components/security_state/core/security_state_unittest.cc @@ -11,8 +11,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/test/metrics/histogram_tester.h" -#include "base/test/scoped_feature_list.h" -#include "components/security_state/core/features.h" #include "net/cert/x509_certificate.h" #include "net/ssl/ssl_cipher_suite_names.h" #include "net/ssl/ssl_connection_status_flags.h" @@ -330,10 +328,6 @@ TEST(SecurityStateTest, SafetyTipSometimesRemovesSecure) { {SafetyTipStatus::kBadKeyword, SECURE}, }; - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitAndEnableFeature( - security_state::features::kSafetyTipUI); - for (auto testcase : kTestCases) { TestSecurityStateHelper helper; helper.set_cert_status(0); |