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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.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/profiles/profile_signin_confirmation_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm
index d9879a495b9324e6c48e50de46d1b5109556f7ec..2af31fd705620cb2382d980bb16b61607a726bec 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm
@@ -92,12 +92,17 @@ NSTextView* AddTextView(
font_style).GetNativeFont();
NSColor* linkColor = gfx::SkColorToCalibratedNSColor(
chrome_style::GetLinkColor());
- [textView setMessageAndLink:base::SysUTF16ToNSString(message)
- withLink:base::SysUTF16ToNSString(link)
- atOffset:offset
- font:font
- messageColor:[NSColor blackColor]
- linkColor:linkColor];
+ NSMutableString* finalMessage = [NSMutableString stringWithString:
+ base::SysUTF16ToNSString(message)];
+ NSString* linkString = base::SysUTF16ToNSString(link);
+
+ [finalMessage insertString:linkString atIndex:offset];
+ [textView setMessage:finalMessage
+ withFont:font
+ messageColor:[NSColor blackColor]];
+ [textView addLinkRange:NSMakeRange(offset, [linkString length])
+ withName:@""
+ linkColor:linkColor];
RemoveUnderlining(textView, offset, link.size());
[textView setDelegate:delegate];
[parent addSubview:textView];

Powered by Google App Engine
This is Rietveld 408576698