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

Unified Diff: ios/chrome/today_extension/notification_center_url_button.mm

Issue 2938433002: [ObjC ARC] Converts ios/chrome/today_extension:today_extension to ARC. (Closed)
Patch Set: Created 3 years, 6 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: 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]);
« no previous file with comments | « ios/chrome/today_extension/interactive_label.mm ('k') | ios/chrome/today_extension/physical_web_optin_footer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698