Commit 15ed6e2e authored by Livvie Lin's avatar Livvie Lin Committed by Commit Bot

Add flag for grey triangle on HTTP pages feature

Adds a parameter to kMarkHttpAsFeature for this experiment.

Bug: 1008218
Change-Id: I6731c8e6609ccaffd6e5654ddc121a95d88f9cc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846560Reviewed-by: default avatarChristopher Thompson <cthomp@chromium.org>
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703881}
parent 84b4433c
...@@ -975,6 +975,9 @@ const FeatureEntry::FeatureParam kMarkHttpAsWarningAndDangerousOnFormEdits[] = { ...@@ -975,6 +975,9 @@ const FeatureEntry::FeatureParam kMarkHttpAsWarningAndDangerousOnFormEdits[] = {
{security_state::features::kMarkHttpAsFeatureParameterName, {security_state::features::kMarkHttpAsFeatureParameterName,
security_state::features:: security_state::features::
kMarkHttpAsParameterWarningAndDangerousOnFormEdits}}; kMarkHttpAsParameterWarningAndDangerousOnFormEdits}};
const FeatureEntry::FeatureParam kMarkHttpAsDangerWarning[] = {
{security_state::features::kMarkHttpAsFeatureParameterName,
security_state::features::kMarkHttpAsParameterDangerWarning}};
// The "Enabled" state for this feature is "0" and representing setting A. // The "Enabled" state for this feature is "0" and representing setting A.
const FeatureEntry::FeatureParam kTabHoverCardsSettingB[] = { const FeatureEntry::FeatureParam kTabHoverCardsSettingB[] = {
...@@ -991,7 +994,9 @@ const FeatureEntry::FeatureVariation kMarkHttpAsFeatureVariations[] = { ...@@ -991,7 +994,9 @@ const FeatureEntry::FeatureVariation kMarkHttpAsFeatureVariations[] = {
base::size(kMarkHttpAsDangerous), nullptr}, base::size(kMarkHttpAsDangerous), nullptr},
{"(mark with a Not Secure warning and dangerous on form edits)", {"(mark with a Not Secure warning and dangerous on form edits)",
kMarkHttpAsWarningAndDangerousOnFormEdits, kMarkHttpAsWarningAndDangerousOnFormEdits,
base::size(kMarkHttpAsWarningAndDangerousOnFormEdits), nullptr}}; base::size(kMarkHttpAsWarningAndDangerousOnFormEdits), nullptr},
{"(mark with a grey triangle icon)", kMarkHttpAsDangerWarning,
base::size(kMarkHttpAsDangerWarning), nullptr}};
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
const FeatureEntry::FeatureParam kTranslateForceTriggerOnEnglishHeuristic[] = { const FeatureEntry::FeatureParam kTranslateForceTriggerOnEnglishHeuristic[] = {
......
...@@ -13,6 +13,7 @@ const char kMarkHttpAsFeatureParameterName[] = "treatment"; ...@@ -13,6 +13,7 @@ const char kMarkHttpAsFeatureParameterName[] = "treatment";
const char kMarkHttpAsParameterDangerous[] = "dangerous"; const char kMarkHttpAsParameterDangerous[] = "dangerous";
const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[] = const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[] =
"warning-and-dangerous-on-form-edits"; "warning-and-dangerous-on-form-edits";
const char kMarkHttpAsParameterDangerWarning[] = "danger-warning";
const base::Feature kLegacyTLSWarnings{"LegacyTLSWarnings", const base::Feature kLegacyTLSWarnings{"LegacyTLSWarnings",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef COMPONENTS_SECURITY_STATE_FEATURES_H_ #ifndef COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_
#define COMPONENTS_SECURITY_STATE_FEATURES_H_ #define COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_
#include "base/feature_list.h" #include "base/feature_list.h"
...@@ -17,6 +17,8 @@ namespace features { ...@@ -17,6 +17,8 @@ namespace features {
// - 'warning-and-dangerous-on-form-edits': Show a Not Secure warning on all // - 'warning-and-dangerous-on-form-edits': Show a Not Secure warning on all
// http:// pages, and treat them as actively dangerous when the user edits // http:// pages, and treat them as actively dangerous when the user edits
// form fields // form fields
// - 'danger-warning': Show a grey triangle icon instead of the info icon on all
// http:// pages.
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.
...@@ -25,6 +27,7 @@ extern const char kMarkHttpAsFeatureParameterName[]; ...@@ -25,6 +27,7 @@ extern const char kMarkHttpAsFeatureParameterName[];
// The different parameter values, described above. // The different parameter values, described above.
extern const char kMarkHttpAsParameterDangerous[]; extern const char kMarkHttpAsParameterDangerous[];
extern const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[]; extern const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[];
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).
...@@ -33,4 +36,4 @@ extern const base::Feature kLegacyTLSWarnings; ...@@ -33,4 +36,4 @@ extern const base::Feature kLegacyTLSWarnings;
} // namespace features } // namespace features
} // namespace security_state } // namespace security_state
#endif // COMPONENTS_SECURITY_STATE_FEATURES_H_ #endif // COMPONENTS_SECURITY_STATE_CORE_FEATURES_H_
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