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 813cb3b076e832b881ccca2ab84ab89e8ed4296a..8fc529e49d0e470d715827e414a7f8444fdd35c7 100644 |
--- a/ios/chrome/test/app/signin_test_util.mm |
+++ b/ios/chrome/test/app/signin_test_util.mm |
@@ -25,6 +25,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; |
@@ -154,9 +158,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); |
} |