| 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 ded3cb3ddadf93bce3220dfe5156918951888abe..61a31269f7720fd7553bbcdf908f7263af8fd1c9 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
|
| @@ -121,7 +121,8 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
|
| new ManagePasswordsDecoration(command_updater, this)),
|
| browser_(browser),
|
| location_bar_visible_(true),
|
| - should_show_secure_verbose_(true),
|
| + should_show_secure_verbose_(false),
|
| + should_show_nonsecure_verbose_(false),
|
| should_animate_security_verbose_(false),
|
| is_width_available_for_security_verbose_(false),
|
| weak_ptr_factory_(this) {
|
| @@ -149,13 +150,14 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
|
| if (command_line->HasSwitch(switches::kMaterialSecurityVerbose)) {
|
| std::string security_verbose_flag =
|
| command_line->GetSwitchValueASCII(switches::kMaterialSecurityVerbose);
|
| -
|
| should_show_secure_verbose_ =
|
| security_verbose_flag ==
|
| switches::kMaterialSecurityVerboseShowAllAnimated ||
|
| security_verbose_flag ==
|
| switches::kMaterialSecurityVerboseShowAllNonAnimated;
|
|
|
| + should_show_nonsecure_verbose_ = true;
|
| +
|
| should_animate_security_verbose_ =
|
| security_verbose_flag ==
|
| switches::kMaterialSecurityVerboseShowAllAnimated ||
|
| @@ -675,20 +677,25 @@ WebContents* LocationBarViewMac::GetWebContents() {
|
| }
|
|
|
| bool LocationBarViewMac::ShouldShowEVBubble() const {
|
| - return (GetToolbarModel()->GetSecurityLevel(false) ==
|
| - security_state::SecurityStateModel::EV_SECURE) &&
|
| - should_show_secure_verbose_;
|
| + return GetToolbarModel()->GetSecurityLevel(false) ==
|
| + security_state::SecurityStateModel::EV_SECURE;
|
| }
|
|
|
| bool LocationBarViewMac::ShouldShowSecurityState() const {
|
| + if (omnibox_view_->IsEditingOrEmpty() ||
|
| + omnibox_view_->model()->is_keyword_hint()) {
|
| + return false;
|
| + }
|
| +
|
| security_state::SecurityStateModel::SecurityLevel security =
|
| GetToolbarModel()->GetSecurityLevel(false);
|
| - bool has_verbose_for_security =
|
| - security == security_state::SecurityStateModel::DANGEROUS ||
|
| - (IsSecureConnection(security) && should_show_secure_verbose_);
|
| + if (security == security_state::SecurityStateModel::EV_SECURE)
|
| + return true;
|
| + else if (security == security_state::SecurityStateModel::SECURE)
|
| + return should_show_secure_verbose_;
|
|
|
| - return has_verbose_for_security && !omnibox_view_->IsEditingOrEmpty() &&
|
| - !omnibox_view_->model()->is_keyword_hint();
|
| + return should_show_nonsecure_verbose_ &&
|
| + security == security_state::SecurityStateModel::DANGEROUS;
|
| }
|
|
|
| bool LocationBarViewMac::IsLocationBarDark() const {
|
|
|