Commit 54af0e9b authored by Livvie Lin's avatar Livvie Lin Committed by Commit Bot

Use component for security state features

This CL unblocks crrev.com/c/1918837, where the original CL was reverted due to a
failed DCHECK in CheckFeatureIdentity that caused VR tests to fail. The fix here is
similar to the one mentioned in crbug.com/872073.

Bug: 1008219
Change-Id: Ic84d05e4e14d2f9cf188a623176f37d589e65a1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919832Reviewed-by: default avatarChristopher Thompson <cthomp@chromium.org>
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716203}
parent 3017a4e4
...@@ -11,14 +11,13 @@ if (is_android) { ...@@ -11,14 +11,13 @@ if (is_android) {
jumbo_static_library("core") { jumbo_static_library("core") {
sources = [ sources = [
"features.cc",
"features.h",
"insecure_input_event_data.h", "insecure_input_event_data.h",
"security_state.cc", "security_state.cc",
"security_state.h", "security_state.h",
] ]
public_deps = [ public_deps = [
":features",
"//base", "//base",
"//net", "//net",
"//url", "//url",
...@@ -41,7 +40,23 @@ jumbo_source_set("unit_tests") { ...@@ -41,7 +40,23 @@ jumbo_source_set("unit_tests") {
deps = [ deps = [
":core", ":core",
":features",
"//net:test_support", "//net:test_support",
"//testing/gtest", "//testing/gtest",
] ]
} }
component("features") {
output_name = "security_state_features"
defines = [ "IS_SECURITY_STATE_FEATURES_IMPL" ]
sources = [
"features.cc",
"features.h",
]
deps = [
"//base",
]
}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_ #ifndef COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_
#define COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_ #define COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_
#include "base/component_export.h"
#include "base/feature_list.h" #include "base/feature_list.h"
namespace security_state { namespace security_state {
...@@ -19,21 +20,28 @@ namespace features { ...@@ -19,21 +20,28 @@ namespace features {
// form fields // form fields
// - 'danger-warning': Show a grey triangle icon instead of the info icon on all // - 'danger-warning': Show a grey triangle icon instead of the info icon on all
// http:// pages. // http:// pages.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kMarkHttpAsFeature; extern const base::Feature kMarkHttpAsFeature;
// The parameter name which controls the warning treatment. // The parameter name which controls the warning treatment.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsFeatureParameterName[]; extern const char kMarkHttpAsFeatureParameterName[];
// The different parameter values, described above. // The different parameter values, described above.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterDangerous[]; extern const char kMarkHttpAsParameterDangerous[];
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[]; extern const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[];
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterDangerWarning[]; extern const char kMarkHttpAsParameterDangerWarning[];
// This feature enables security warning UI treatments for sites that use legacy // This feature enables security warning UI treatments for sites that use legacy
// TLS version (TLS 1.0 or 1.1). // TLS version (TLS 1.0 or 1.1).
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kLegacyTLSWarnings; extern const base::Feature kLegacyTLSWarnings;
// This feature enables Safety Tip warnings on possibly-risky sites. // This feature enables Safety Tip warnings on possibly-risky sites.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kSafetyTipUI; extern const base::Feature kSafetyTipUI;
} // namespace features } // namespace features
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment