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 |