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) {
jumbo_static_library("core") {
sources = [
"features.cc",
"features.h",
"insecure_input_event_data.h",
"security_state.cc",
"security_state.h",
]
public_deps = [
":features",
"//base",
"//net",
"//url",
......@@ -41,7 +40,23 @@ jumbo_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",
]
}
......@@ -5,6 +5,7 @@
#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 {
......@@ -19,21 +20,28 @@ namespace features {
// form fields
// - 'danger-warning': Show a grey triangle icon instead of the info icon on all
// http:// pages.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kMarkHttpAsFeature;
// The parameter name which controls the warning treatment.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsFeatureParameterName[];
// The different parameter values, described above.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterDangerous[];
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[];
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const char kMarkHttpAsParameterDangerWarning[];
// This feature enables security warning UI treatments for sites that use legacy
// TLS version (TLS 1.0 or 1.1).
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kLegacyTLSWarnings;
// This feature enables Safety Tip warnings on possibly-risky sites.
COMPONENT_EXPORT(SECURITY_STATE_FEATURES)
extern const base::Feature kSafetyTipUI;
} // 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