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

Unified Diff: ios/chrome/browser/ui/sync/sync_util.mm

Issue 2939433002: [ObjC ARC] Converts ios/chrome/browser/ui/sync:sync to ARC. (Closed)
Patch Set: 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/browser/ui/sync/sync_error_infobar_delegate.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/sync/sync_util.mm
diff --git a/ios/chrome/browser/ui/sync/sync_util.mm b/ios/chrome/browser/ui/sync/sync_util.mm
index 8e168115d519b534b71a77698e9530eb57b064d6..6370529ede95f42373587e54602e815d2f372faa 100644
--- a/ios/chrome/browser/ui/sync/sync_util.mm
+++ b/ios/chrome/browser/ui/sync/sync_util.mm
@@ -19,6 +19,10 @@
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Enumerated constants for logging when a sign-in error infobar was shown
// to the user. This was added for crbug/265352 to quantify how often this
@@ -109,19 +113,17 @@ GenericChromeCommand* GetSyncCommandForBrowserState(
syncSetupService->GetSyncServiceState();
switch (syncState) {
case SyncSetupService::kSyncServiceSignInNeedsUpdate:
- return [[[ShowSigninCommand alloc]
+ return [[ShowSigninCommand alloc]
initWithOperation:AUTHENTICATION_OPERATION_REAUTHENTICATE
- accessPoint:signin_metrics::AccessPoint::ACCESS_POINT_UNKNOWN]
- autorelease];
+ accessPoint:signin_metrics::AccessPoint::ACCESS_POINT_UNKNOWN];
case SyncSetupService::kSyncServiceNeedsPassphrase:
- return [[[GenericChromeCommand alloc]
- initWithTag:IDC_SHOW_SYNC_PASSPHRASE_SETTINGS] autorelease];
+ return [[GenericChromeCommand alloc]
+ initWithTag:IDC_SHOW_SYNC_PASSPHRASE_SETTINGS];
case SyncSetupService::kSyncServiceCouldNotConnect:
case SyncSetupService::kSyncServiceServiceUnavailable:
case SyncSetupService::kSyncServiceUnrecoverableError:
case SyncSetupService::kNoSyncServiceError:
- return [[[GenericChromeCommand alloc] initWithTag:IDC_SHOW_SYNC_SETTINGS]
- autorelease];
+ return [[GenericChromeCommand alloc] initWithTag:IDC_SHOW_SYNC_SETTINGS];
}
}
« no previous file with comments | « ios/chrome/browser/ui/sync/sync_error_infobar_delegate.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698