Index: ios/chrome/test/app/signin_test_util.mm |
diff --git a/ios/chrome/test/app/signin_test_util.mm b/ios/chrome/test/app/signin_test_util.mm |
index 342e1b85b955e6a046ed8ade51e24801fb7365c2..44753c61d988f6eae402356ee74c23aacdcee4f9 100644 |
--- a/ios/chrome/test/app/signin_test_util.mm |
+++ b/ios/chrome/test/app/signin_test_util.mm |
@@ -24,6 +24,10 @@ |
#include "net/url_request/url_fetcher_delegate.h" |
#include "net/url_request/url_request_status.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
namespace { |
net::FakeURLFetcherFactory* gFakeURLFetcherFactory = nullptr; |
@@ -152,9 +156,8 @@ bool SignOutAndClearAccounts() { |
// Clear known identities. |
ios::ChromeIdentityService* identity_service = |
ios::GetChromeBrowserProvider()->GetChromeIdentityService(); |
- base::scoped_nsobject<NSArray> identities( |
- [identity_service->GetAllIdentities() copy]); |
- for (ChromeIdentity* identity in identities.get()) { |
+ NSArray* identities([identity_service->GetAllIdentities() copy]); |
+ for (ChromeIdentity* identity in identities) { |
identity_service->ForgetIdentity(identity, nil); |
} |