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

Unified Diff: ios/chrome/browser/chrome_url_util.mm

Issue 2566993002: [ObjC ARC] Converts ios/chrome/browser:browser to ARC. (Closed)
Patch Set: comments Created 4 years 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
« no previous file with comments | « ios/chrome/browser/chrome_paths.mm ('k') | ios/chrome/browser/crash_loop_detection_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/chrome_url_util.mm
diff --git a/ios/chrome/browser/chrome_url_util.mm b/ios/chrome/browser/chrome_url_util.mm
index 1ba6a4e36f1ff1aaaebf9cdea94ae49a2ac0ecde..fa95738b62fac273a0c1273846f599ded0ff992d 100644
--- a/ios/chrome/browser/chrome_url_util.mm
+++ b/ios/chrome/browser/chrome_url_util.mm
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_block.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/chrome_url_constants.h"
@@ -18,6 +17,10 @@
#include "url/gurl.h"
#include "url/url_constants.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
bool UrlIsExternalFileReference(const GURL& url) {
return url.SchemeIs(kChromeUIScheme) &&
base::LowerCaseEqualsASCII(url.host(), kChromeUIExternalFileHost);
@@ -43,7 +46,7 @@ bool IsHandledProtocol(const std::string& scheme) {
}
@implementation ChromeAppConstants {
- base::scoped_nsobject<NSString> _callbackScheme;
+ NSString* _callbackScheme;
}
+ (ChromeAppConstants*)sharedInstance {
@@ -64,7 +67,7 @@ bool IsHandledProtocol(const std::string& scheme) {
base::mac::ObjCCastStrict<NSArray>(urlType[@"CFBundleURLSchemes"]);
for (NSString* scheme in schemes) {
if ([allowableSchemes containsObject:scheme])
- _callbackScheme.reset([scheme copy]);
+ _callbackScheme = [scheme copy];
}
}
}
@@ -73,7 +76,7 @@ bool IsHandledProtocol(const std::string& scheme) {
}
- (void)setCallbackSchemeForTesting:(NSString*)scheme {
- _callbackScheme.reset([scheme copy]);
+ _callbackScheme = [scheme copy];
}
@end
« no previous file with comments | « ios/chrome/browser/chrome_paths.mm ('k') | ios/chrome/browser/crash_loop_detection_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698