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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm

Issue 887823002: Finished swap out of old API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unit test for [HyperlinkTextView setMessageAndLink:withLink:atOffset:font:messageColor:linkC… Created 5 years, 11 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
Index: chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm
index 7560f67cc69c5a779a38b67c7893e8b8c89a9c04..1ac0c2a56c6939e7394198016e1bc24b56b17c26 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm
@@ -176,16 +176,17 @@ static const CGFloat kTabHorzMargin = 13;
// Get the help text and link.
size_t linkOffset = 0;
+ const base::string16 helpLink =
+ l10n_util::GetStringUTF16(IDS_SAD_TAB_HELP_LINK);
NSString* helpMessage(base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(
- IDS_SAD_TAB_HELP_MESSAGE, base::string16(), &linkOffset)));
- NSString* helpLink = l10n_util::GetNSString(IDS_SAD_TAB_HELP_LINK);
+ IDS_SAD_TAB_HELP_MESSAGE, helpLink, &linkOffset)));
NSFont* font = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
- [help_ setMessageAndLink:helpMessage
- withLink:helpLink
- atOffset:linkOffset
- font:font
- messageColor:[NSColor whiteColor]
- linkColor:[NSColor whiteColor]];
+ [help_ setMessage:helpMessage
+ withFont:font
+ messageColor:[NSColor whiteColor]];
+ [help_ addLinkRange:NSMakeRange(linkOffset, helpLink.length())
+ withName:@""
+ linkColor:[NSColor whiteColor]];
[help_ setAlignment:NSCenterTextAlignment];
}

Powered by Google App Engine
This is Rietveld 408576698