Index: ios/chrome/today_extension/notification_center_url_button.mm |
diff --git a/ios/chrome/today_extension/notification_center_url_button.mm b/ios/chrome/today_extension/notification_center_url_button.mm |
index ed50a7b1cd5efa93f05dd023f3d8efb305d2f50b..e025727fd4c79f1032af8977ef1cf3191c7ac438 100644 |
--- a/ios/chrome/today_extension/notification_center_url_button.mm |
+++ b/ios/chrome/today_extension/notification_center_url_button.mm |
@@ -18,14 +18,16 @@ const CGFloat kSubtitleFontSize = 14; |
} |
@implementation NotificationCenterURLButton { |
- base::mac::ScopedBlock<URLActionBlock> _openURLBlock; |
+ URLActionBlock _openURLBlock; |
base::scoped_nsobject<NSString> _url; |
base::scoped_nsobject<UILabel> _subtitleLabel; |
base::scoped_nsobject<UIView> _bottomSeparator; |
} |
- (void)openURL:(id)sender { |
- _openURLBlock.get()(_url); |
+ if (_openURLBlock) { |
+ _openURLBlock(_url); |
+ } |
} |
- (NSString*)unescapeURLString:(NSString*)urlString { |
@@ -50,7 +52,7 @@ const CGFloat kSubtitleFontSize = 14; |
inkColor:ui_util::InkColor() |
titleColor:ui_util::TitleColor()]; |
if (self) { |
- _openURLBlock.reset(block, base::scoped_policy::RETAIN); |
+ _openURLBlock = [block copy]; |
[self setContentVerticalAlignment:UIControlContentVerticalAlignmentTop]; |
_url.reset([url copy]); |