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

Unified Diff: ios/chrome/browser/app_startup_parameters.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/app_startup_parameters.h ('k') | ios/chrome/browser/chrome_coordinator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/app_startup_parameters.mm
diff --git a/ios/chrome/browser/app_startup_parameters.mm b/ios/chrome/browser/app_startup_parameters.mm
index dd43c246b4a2e16654aa35aa159c35565f9f1c36..7b24e771f400f94af99954ad6fe5e5a505d012ae 100644
--- a/ios/chrome/browser/app_startup_parameters.mm
+++ b/ios/chrome/browser/app_startup_parameters.mm
@@ -5,14 +5,16 @@
#import "ios/chrome/browser/app_startup_parameters.h"
#include "base/logging.h"
-#import "base/mac/scoped_nsobject.h"
#include "ios/chrome/browser/experimental_flags.h"
#import "ios/chrome/browser/xcallback_parameters.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@implementation AppStartupParameters {
GURL _externalURL;
- base::scoped_nsobject<XCallbackParameters> _xCallbackParameters;
BOOL _launchVoiceSearch;
BOOL _launchInIncognito;
BOOL _launchQRScanner;
@@ -20,14 +22,12 @@
@synthesize launchVoiceSearch = _launchVoiceSearch;
@synthesize launchInIncognito = _launchInIncognito;
+@synthesize xCallbackParameters = _xCallbackParameters;
- (const GURL&)externalURL {
return _externalURL;
}
-- (XCallbackParameters*)xCallbackParameters {
- return _xCallbackParameters.get();
-}
- (instancetype)init {
NOTREACHED();
@@ -42,8 +42,8 @@
xCallbackParameters:(XCallbackParameters*)xCallbackParameters {
self = [super init];
if (self) {
- _externalURL = GURL(externalURL);
- _xCallbackParameters.reset([xCallbackParameters retain]);
+ _externalURL = externalURL;
+ _xCallbackParameters = xCallbackParameters;
}
return self;
}
@@ -51,7 +51,7 @@
- (NSString*)description {
return [NSString stringWithFormat:@"ExternalURL: %s \nXCallbackParams: %@",
_externalURL.spec().c_str(),
- _xCallbackParameters.get()];
+ _xCallbackParameters];
}
#pragma mark Property implementation.
« no previous file with comments | « ios/chrome/browser/app_startup_parameters.h ('k') | ios/chrome/browser/chrome_coordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698