Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2093)

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 2560203003: Remove SecurityChips experiment and flags (Closed)
Patch Set: fix rebase conflict mishap Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 581610865a5ec35042e4f47226f35a80df0036d1..deaca372b3629a053244b791fc079dc0bd5a3f88 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -123,10 +123,6 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
new ManagePasswordsDecoration(command_updater, this)),
browser_(browser),
location_bar_visible_(true),
- should_show_secure_verbose_(false),
- should_show_nonsecure_verbose_(false),
- should_animate_secure_verbose_(false),
- should_animate_nonsecure_verbose_(false),
is_width_available_for_security_verbose_(false),
security_level_(security_state::NONE),
weak_ptr_factory_(this) {
@@ -150,39 +146,6 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
[[field_ cell] setIsPopupMode:
!browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)];
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- std::string security_chip;
- if (command_line->HasSwitch(switches::kSecurityChip)) {
- security_chip = command_line->GetSwitchValueASCII(switches::kSecurityChip);
- } else if (base::FeatureList::IsEnabled(features::kSecurityChip)) {
- security_chip = variations::GetVariationParamValueByFeature(
- features::kSecurityChip, kSecurityChipFeatureVisibilityParam);
- }
-
- if (security_chip == switches::kSecurityChipShowNonSecureOnly) {
- should_show_nonsecure_verbose_ = true;
- } else if (security_chip == switches::kSecurityChipShowAll) {
- should_show_secure_verbose_ = true;
- should_show_nonsecure_verbose_ = true;
- }
-
- std::string security_chip_animation;
- if (command_line->HasSwitch(switches::kSecurityChipAnimation)) {
- security_chip_animation =
- command_line->GetSwitchValueASCII(switches::kSecurityChipAnimation);
- } else if (base::FeatureList::IsEnabled(features::kSecurityChip)) {
- security_chip_animation = variations::GetVariationParamValueByFeature(
- features::kSecurityChip, kSecurityChipFeatureAnimationParam);
- }
-
- if (security_chip_animation ==
- switches::kSecurityChipAnimationNonSecureOnly) {
- should_animate_nonsecure_verbose_ = true;
- } else if (security_chip_animation == switches::kSecurityChipAnimationAll) {
- should_animate_secure_verbose_ = true;
- should_animate_nonsecure_verbose_ = true;
- }
-
// Sets images for the decorations, and performs a layout. This call ensures
// that this class is in a consistent state after initialization.
OnChanged();
@@ -701,14 +664,10 @@ bool LocationBarViewMac::ShouldShowSecurityState() const {
security_state::SecurityLevel security =
GetToolbarModel()->GetSecurityLevel(false);
- if (security == security_state::EV_SECURE)
- return true;
- else if (security == security_state::SECURE)
- return should_show_secure_verbose_;
-
- return should_show_nonsecure_verbose_ &&
- (security == security_state::DANGEROUS ||
- security == security_state::HTTP_SHOW_WARNING);
+ return security == security_state::EV_SECURE ||
+ security == security_state::SECURE ||
+ security == security_state::DANGEROUS ||
+ security == security_state::HTTP_SHOW_WARNING;
}
bool LocationBarViewMac::IsLocationBarDark() const {
@@ -926,14 +885,8 @@ void LocationBarViewMac::UpdateSecurityState(bool tab_changed) {
bool LocationBarViewMac::CanAnimateSecurityLevel(
security_state::SecurityLevel level) const {
using SecurityLevel = security_state::SecurityLevel;
- if (IsSecureConnection(level)) {
- return should_animate_secure_verbose_;
- } else if (security_level_ == SecurityLevel::DANGEROUS ||
- security_level_ == SecurityLevel::HTTP_SHOW_WARNING) {
- return should_animate_nonsecure_verbose_;
- } else {
- return false;
- }
+ return security_level_ == SecurityLevel::DANGEROUS ||
+ security_level_ == SecurityLevel::HTTP_SHOW_WARNING;
}
bool LocationBarViewMac::IsSecureConnection(

Powered by Google App Engine
This is Rietveld 408576698