summaryrefslogtreecommitdiff
path: root/chromium/components/security_state
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-29 10:46:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:02:10 +0000
commit99677208ff3b216fdfec551fbe548da5520cd6fb (patch)
tree476a4865c10320249360e859d8fdd3e01833b03a /chromium/components/security_state
parentc30a6232df03e1efbd9f3b226777b07e087a1122 (diff)
downloadqtwebengine-chromium-99677208ff3b216fdfec551fbe548da5520cd6fb.tar.gz
BASELINE: Update Chromium to 86.0.4240.124
Change-Id: Ide0ff151e94cd665ae6521a446995d34a9d1d644 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/security_state')
-rw-r--r--chromium/components/security_state/content/BUILD.gn6
-rw-r--r--chromium/components/security_state/core/BUILD.gn6
-rw-r--r--chromium/components/security_state/core/security_state.cc19
-rw-r--r--chromium/components/security_state/core/security_state.h8
4 files changed, 15 insertions, 24 deletions
diff --git a/chromium/components/security_state/content/BUILD.gn b/chromium/components/security_state/content/BUILD.gn
index f4cb33aa39f..cb0ed6b0329 100644
--- a/chromium/components/security_state/content/BUILD.gn
+++ b/chromium/components/security_state/content/BUILD.gn
@@ -2,9 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/jumbo.gni")
-
-jumbo_static_library("content") {
+static_library("content") {
sources = [
"content_utils.cc",
"content_utils.h",
@@ -29,7 +27,7 @@ jumbo_static_library("content") {
]
}
-jumbo_source_set("unit_tests") {
+source_set("unit_tests") {
testonly = true
sources = [ "content_utils_unittest.cc" ]
diff --git a/chromium/components/security_state/core/BUILD.gn b/chromium/components/security_state/core/BUILD.gn
index 80202ef3536..fbadf7ed7a5 100644
--- a/chromium/components/security_state/core/BUILD.gn
+++ b/chromium/components/security_state/core/BUILD.gn
@@ -2,14 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/jumbo.gni")
-
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
-jumbo_static_library("core") {
+static_library("core") {
sources = [
"insecure_input_event_data.h",
"security_state.cc",
@@ -37,7 +35,7 @@ if (is_android) {
}
}
-jumbo_source_set("unit_tests") {
+source_set("unit_tests") {
testonly = true
sources = [ "security_state_unittest.cc" ]
diff --git a/chromium/components/security_state/core/security_state.cc b/chromium/components/security_state/core/security_state.cc
index 85805816ef9..88d750d0e82 100644
--- a/chromium/components/security_state/core/security_state.cc
+++ b/chromium/components/security_state/core/security_state.cc
@@ -44,14 +44,6 @@ SecurityLevel GetSecurityLevelForNonSecureFieldTrial(
return input_events.insecure_field_edited ? DANGEROUS : WARNING;
}
-SecurityLevel GetSecurityLevelForDisplayedMixedContent(bool suppress_warning) {
- if (base::FeatureList::IsEnabled(features::kPassiveMixedContentWarning) &&
- !suppress_warning) {
- return kDisplayedInsecureContentWarningLevel;
- }
- return kDisplayedInsecureContentLevel;
-}
-
std::string GetHistogramSuffixForSecurityLevel(
security_state::SecurityLevel level) {
switch (level) {
@@ -223,11 +215,14 @@ SecurityLevel GetSecurityLevel(
DCHECK(!visible_security_state.ran_content_with_cert_errors);
if (visible_security_state.displayed_mixed_content) {
- return GetSecurityLevelForDisplayedMixedContent(
- visible_security_state.should_suppress_mixed_content_warning);
+ if (base::FeatureList::IsEnabled(features::kPassiveMixedContentWarning)) {
+ return kDisplayedInsecureContentWarningLevel;
+ }
+ return kDisplayedInsecureContentLevel;
}
- if (visible_security_state.contained_mixed_form ||
+ if ((visible_security_state.contained_mixed_form &&
+ !visible_security_state.should_treat_displayed_mixed_forms_as_secure) ||
visible_security_state.displayed_content_with_cert_errors) {
return kDisplayedInsecureContentLevel;
}
@@ -280,7 +275,7 @@ VisibleSecurityState::VisibleSecurityState()
is_reader_mode(false),
connection_used_legacy_tls(false),
should_suppress_legacy_tls_warning(false),
- should_suppress_mixed_content_warning(false) {}
+ should_treat_displayed_mixed_forms_as_secure(false) {}
VisibleSecurityState::VisibleSecurityState(const VisibleSecurityState& other) =
default;
diff --git a/chromium/components/security_state/core/security_state.h b/chromium/components/security_state/core/security_state.h
index 3a20acc840d..134d6c7a3a1 100644
--- a/chromium/components/security_state/core/security_state.h
+++ b/chromium/components/security_state/core/security_state.h
@@ -204,10 +204,10 @@ struct VisibleSecurityState {
// True if the page should be excluded from a UI treatment for legacy TLS
// (used for control group in an experimental UI rollout).
bool should_suppress_legacy_tls_warning;
- // True if the page should be excluded from a warning UI treatment for mixed
- // content. If set to false, the page will receive a neutral (rather than
- // positively secure) UI treatment.
- bool should_suppress_mixed_content_warning;
+ // True if mixed forms should be treated as secure from the visible security
+ // state perspective (for example, if a different warning is being shown for
+ // them).
+ bool should_treat_displayed_mixed_forms_as_secure;
// Contains information about input events that may impact the security
// level of the page.
InsecureInputEventData insecure_input_events;