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

Unified Diff: ios/chrome/app/application_delegate/user_activity_handler.mm

Issue 2621943002: [ObjC ARC] Converts ios/chrome/app/application_delegate:application_delegate_internal to ARC. (Closed)
Patch Set: comment Created 3 years, 11 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/application_delegate/url_opener.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/application_delegate/user_activity_handler.mm
diff --git a/ios/chrome/app/application_delegate/user_activity_handler.mm b/ios/chrome/app/application_delegate/user_activity_handler.mm
index 6b3b9e8c9112b7c4154bce1a118aa998ea483384..5d6a99096188cadffde139bda17f945f4d289e65 100644
--- a/ios/chrome/app/application_delegate/user_activity_handler.mm
+++ b/ios/chrome/app/application_delegate/user_activity_handler.mm
@@ -9,7 +9,6 @@
#include "base/ios/block_types.h"
#include "base/ios/ios_util.h"
-#include "base/ios/weak_nsobject.h"
#include "base/mac/foundation_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics_action.h"
@@ -32,6 +31,10 @@
#include "ui/base/page_transition_types.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
using base::UserMetricsAction;
namespace {
@@ -76,8 +79,8 @@ NSString* const kShortcutQRScanner = @"OpenQRScanner";
// at this time is opening a New Tab Page.
GURL newTabURL(kChromeUINewTabURL);
webpageURL = net::NSURLWithGURL(newTabURL);
- base::scoped_nsobject<AppStartupParameters> startupParams(
- [[AppStartupParameters alloc] initWithExternalURL:newTabURL]);
+ AppStartupParameters* startupParams =
+ [[AppStartupParameters alloc] initWithExternalURL:newTabURL];
[startupInformation setStartupParameters:startupParams];
base::RecordAction(base::UserMetricsAction("IOSLaunchedByUniversalLink"));
} else if (spotlight::IsSpotlightAvailable() &&
@@ -101,9 +104,8 @@ NSString* const kShortcutQRScanner = @"OpenQRScanner";
if (domain == spotlight::DOMAIN_ACTIONS) {
webpageURL =
[NSURL URLWithString:base::SysUTF8ToNSString(kChromeUINewTabURL)];
- base::scoped_nsobject<AppStartupParameters> startupParams(
- [[AppStartupParameters alloc]
- initWithExternalURL:GURL(kChromeUINewTabURL)]);
+ AppStartupParameters* startupParams = [[AppStartupParameters alloc]
+ initWithExternalURL:GURL(kChromeUINewTabURL)];
BOOL startupParamsSet = spotlight::SetStartupParametersForSpotlightAction(
itemID, startupParams);
if (!startupParamsSet) {
@@ -174,8 +176,8 @@ NSString* const kShortcutQRScanner = @"OpenQRScanner";
[startupInformation resetFirstUserActionRecorder];
if (![startupInformation startupParameters]) {
- base::scoped_nsobject<AppStartupParameters> startupParams(
- [[AppStartupParameters alloc] initWithExternalURL:webpageGURL]);
+ AppStartupParameters* startupParams =
+ [[AppStartupParameters alloc] initWithExternalURL:webpageGURL];
[startupInformation setStartupParameters:startupParams];
}
return YES;
@@ -256,9 +258,8 @@ NSString* const kShortcutQRScanner = @"OpenQRScanner";
if ([startupInformation isPresentingFirstRunUI])
return NO;
- base::scoped_nsobject<AppStartupParameters> startupParams(
- [[AppStartupParameters alloc]
- initWithExternalURL:GURL(kChromeUINewTabURL)]);
+ AppStartupParameters* startupParams = [[AppStartupParameters alloc]
+ initWithExternalURL:GURL(kChromeUINewTabURL)];
if ([shortcutItem.type isEqualToString:kShortcutNewTab]) {
base::RecordAction(UserMetricsAction("ApplicationShortcut.NewTabPressed"));
« no previous file with comments | « ios/chrome/app/application_delegate/url_opener.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698