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

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

Issue 2456993002: [Mac] Fix security chip page load issue (Closed)
Patch Set: nit Created 4 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38bae1984894cf870c6f65b1ff78d0985497e24c..ee5c593cc8fca3ed39f5f385e3f26afca286652b 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
@@ -490,6 +490,14 @@ void LocationBarViewMac::Layout() {
}
const bool is_keyword_hint = omnibox_view_->model()->is_keyword_hint();
+
+ // This is true for EV certificate since the certificate should be
+ // displayed, even if the width is narrow.
+ CGFloat available_width =
+ [cell availableWidthInFrame:[[cell controlView] frame]];
+ is_width_available_for_security_verbose_ =
+ available_width >= kMinURLWidth || ShouldShowEVBubble();
+
if (!keyword.empty() && !is_keyword_hint) {
// Switch from location icon to keyword mode.
location_icon_decoration_->SetVisible(false);
@@ -511,14 +519,7 @@ void LocationBarViewMac::Layout() {
base::string16 label(GetToolbarModel()->GetEVCertName());
security_state_bubble_decoration_->SetFullLabel(
base::SysUTF16ToNSString(label));
-
- // This is true for EV certificate since the certificate should be
- // displayed, even if the width is narrow.
- is_width_available_for_security_verbose_ = true;
} else if (ShouldShowSecurityState()) {
- CGFloat available_width =
- [cell availableWidthInFrame:[[cell controlView] frame]];
- is_width_available_for_security_verbose_ = available_width >= kMinURLWidth;
bool is_security_state_visible =
is_width_available_for_security_verbose_ ||
security_state_bubble_decoration_->AnimatingOut();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698