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

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

Issue 2695303003: [Merge M57] Display a simple tooltip text for empty labels in verbose states (Closed)
Patch Set: Created 3 years, 10 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/security_state_bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
index d3bd316da9f024749ad3838bbeb4f8d855e5809c..7d105a92fa5fc35b0d3f1cce70832aa3bbb32bf6 100644
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
@@ -279,8 +279,12 @@ NSPoint SecurityStateBubbleDecoration::GetBubblePointInFrame(NSRect frame) {
}
NSString* SecurityStateBubbleDecoration::GetToolTip() {
- return [NSString stringWithFormat:@"%@. %@", full_label_.get(),
- l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON)];
+ NSString* tooltip_icon_text =
+ l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON);
+ if ([full_label_ length] == 0)
+ return tooltip_icon_text;
+ return [NSString
+ stringWithFormat:@"%@. %@", full_label_.get(), tooltip_icon_text];
}
//////////////////////////////////////////////////////////////////
« 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