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

Unified Diff: ios/chrome/browser/signin/authentication_service_fake.mm

Issue 2930303002: [ObjC ARC] Converts ios/chrome/browser/signin:test_support 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
Index: ios/chrome/browser/signin/authentication_service_fake.mm
diff --git a/ios/chrome/browser/signin/authentication_service_fake.mm b/ios/chrome/browser/signin/authentication_service_fake.mm
index 6dd641883220741e589d7e794f4f8276ad1801bf..6eac534e7f4f461f85ab919f2b35aaca35df0000 100644
--- a/ios/chrome/browser/signin/authentication_service_fake.mm
+++ b/ios/chrome/browser/signin/authentication_service_fake.mm
@@ -13,6 +13,10 @@
#include "ios/chrome/browser/sync/sync_setup_service_factory.h"
#import "ios/public/provider/chrome/browser/signin/chrome_identity.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
AuthenticationServiceFake::AuthenticationServiceFake(
ios::ChromeBrowserState* browser_state)
: AuthenticationService(
@@ -25,13 +29,13 @@ AuthenticationServiceFake::~AuthenticationServiceFake() {}
void AuthenticationServiceFake::SignIn(ChromeIdentity* identity,
const std::string& hosted_domain) {
- authenticated_identity_.reset([identity retain]);
+ authenticated_identity_ = identity;
}
void AuthenticationServiceFake::SignOut(
signin_metrics::ProfileSignout signout_source,
ProceduralBlock completion) {
- authenticated_identity_.reset();
+ authenticated_identity_ = nil;
if (completion)
completion();
}
@@ -45,7 +49,7 @@ bool AuthenticationServiceFake::HaveAccountsChanged() {
}
bool AuthenticationServiceFake::IsAuthenticated() {
- return authenticated_identity_.get();
+ return authenticated_identity_ != nil;
}
ChromeIdentity* AuthenticationServiceFake::GetAuthenticatedIdentity() {

Powered by Google App Engine
This is Rietveld 408576698