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

Unified Diff: ios/chrome/browser/ui/settings/settings_utils.mm

Issue 2813223002: [ObjC ARC] Converts ios/chrome/browser/ui/settings:settings to ARC. (Closed)
Patch Set: reabse Created 3 years, 7 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/browser/ui/settings/settings_utils.mm
diff --git a/ios/chrome/browser/ui/settings/settings_utils.mm b/ios/chrome/browser/ui/settings/settings_utils.mm
index be44fa80aed3f4a79851e82ff77c5f7b074cc0ef..ae3e7e956b2d852bf66523cfd71636b61286c3c7 100644
--- a/ios/chrome/browser/ui/settings/settings_utils.mm
+++ b/ios/chrome/browser/ui/settings/settings_utils.mm
@@ -4,27 +4,29 @@
#import "ios/chrome/browser/ui/settings/settings_utils.h"
-#import "base/ios/weak_nsobject.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
#import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
#import "ios/chrome/browser/ui/commands/open_url_command.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace ios_internal_settings {
ProceduralBlockWithURL BlockToOpenURL(UIResponder* responder) {
- base::WeakNSObject<UIResponder> weakResponder(responder);
+ __weak UIResponder* weakResponder = responder;
ProceduralBlockWithURL blockToOpenURL = ^(const GURL& url) {
- base::scoped_nsobject<UIResponder> strongResponder([weakResponder retain]);
+ UIResponder* strongResponder = weakResponder;
if (!strongResponder)
return;
- base::scoped_nsobject<OpenUrlCommand> command(
- [[OpenUrlCommand alloc] initWithURLFromChrome:url]);
+ OpenUrlCommand* command =
+ [[OpenUrlCommand alloc] initWithURLFromChrome:url];
[command setTag:IDC_CLOSE_SETTINGS_AND_OPEN_URL];
[strongResponder chromeExecuteCommand:command];
};
- return [[blockToOpenURL copy] autorelease];
+ return [blockToOpenURL copy];
}
} // namespace ios_internal_settings

Powered by Google App Engine
This is Rietveld 408576698