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/app/chrome_app_startup_parameters.mm

Issue 2933823002: [ObjC ARC] Converts ios/chrome/app:app_internal to ARC. (Closed)
Patch Set: Rebased 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
« no previous file with comments | « ios/chrome/app/BUILD.gn ('k') | ios/chrome/app/chrome_overlay_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/chrome_app_startup_parameters.mm
diff --git a/ios/chrome/app/chrome_app_startup_parameters.mm b/ios/chrome/app/chrome_app_startup_parameters.mm
index bc1a9f8307586ff86c58b6c8a9e00b5c9df94803..aeafd78661e77ff528a2ac727d25163825254829 100644
--- a/ios/chrome/app/chrome_app_startup_parameters.mm
+++ b/ios/chrome/app/chrome_app_startup_parameters.mm
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "base/mac/foundation_util.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/sys_string_conversions.h"
@@ -17,6 +16,10 @@
#import "net/base/mac/url_conversions.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Key of the UMA Startup.MobileSessionStartAction histogram.
@@ -47,9 +50,9 @@ enum MobileSessionStartAction {
} // namespace
@implementation ChromeAppStartupParameters {
- base::scoped_nsobject<NSString> _secureSourceApp;
- base::scoped_nsobject<NSString> _declaredSourceApp;
- base::scoped_nsobject<NSURL> _completeURL;
+ NSString* _secureSourceApp;
+ NSString* _declaredSourceApp;
+ NSURL* _completeURL;
}
- (instancetype)initWithExternalURL:(const GURL&)externalURL
@@ -66,9 +69,9 @@ enum MobileSessionStartAction {
self = [super initWithExternalURL:externalURL
xCallbackParameters:xCallbackParameters];
if (self) {
- _declaredSourceApp.reset([declaredSourceApp copy]);
- _secureSourceApp.reset([secureSourceApp copy]);
- _completeURL.reset([completeURL retain]);
+ _declaredSourceApp = [declaredSourceApp copy];
+ _secureSourceApp = [secureSourceApp copy];
+ _completeURL = completeURL;
}
return self;
}
@@ -117,8 +120,8 @@ enum MobileSessionStartAction {
return nil;
}
- base::scoped_nsobject<XCallbackParameters> xcallbackParameters(
- [[XCallbackParameters alloc] initWithSourceAppId:appId]);
+ XCallbackParameters* xcallbackParameters =
+ [[XCallbackParameters alloc] initWithSourceAppId:appId];
return [[ChromeAppStartupParameters alloc]
initWithExternalURL:url
@@ -174,8 +177,8 @@ enum MobileSessionStartAction {
fromSourceApplication:
(NSString*)appId {
NSString* appGroup = app_group::ApplicationGroup();
- base::scoped_nsobject<NSUserDefaults> sharedDefaults(
- [[NSUserDefaults alloc] initWithSuiteName:appGroup]);
+ NSUserDefaults* sharedDefaults =
+ [[NSUserDefaults alloc] initWithSuiteName:appGroup];
NSString* commandDictionaryPreference =
base::SysUTF8ToNSString(app_group::kChromeAppGroupCommandPreference);
« no previous file with comments | « ios/chrome/app/BUILD.gn ('k') | ios/chrome/app/chrome_overlay_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698