Chromium Code Reviews| 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..dbfec1a7e26296b2530097520f164a003532661a 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,13 +664,9 @@ 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 || |
| + return (security == security_state::EV_SECURE || |
|
spqchan
2016/12/09 22:46:50
Nit: Don't think we need the round brackets
estark
2016/12/09 22:56:25
Done.
|
| + security == security_state::SECURE || |
| + security == security_state::DANGEROUS || |
| security == security_state::HTTP_SHOW_WARNING); |
| } |
| @@ -926,14 +885,9 @@ 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 (IsSecureConnection(level) || |
|
spqchan
2016/12/09 22:46:50
Are we animating all? I thought the plan was to an
estark
2016/12/09 22:56:25
Hrm, where's that plan from? The server-side Finch
spqchan
2016/12/09 23:04:21
I remember hearing it from emilyschechter@ that we
|
| + security_level_ == SecurityLevel::DANGEROUS || |
| + security_level_ == SecurityLevel::HTTP_SHOW_WARNING); |
| } |
| bool LocationBarViewMac::IsSecureConnection( |