Index: ios/net/clients/crn_simple_network_client_factory.mm |
diff --git a/ios/net/clients/crn_simple_network_client_factory.mm b/ios/net/clients/crn_simple_network_client_factory.mm |
index 9ffd9d255b69b798cdd2c87da6bdad53bfae8984..d8245aca38c4fcad42bd31b680a7866caf006325 100644 |
--- a/ios/net/clients/crn_simple_network_client_factory.mm |
+++ b/ios/net/clients/crn_simple_network_client_factory.mm |
@@ -8,6 +8,10 @@ |
#include "base/mac/scoped_nsobject.h" |
#import "ios/net/clients/crn_forwarding_network_client.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
@interface CRNSimpleNetworkClientFactory () { |
base::scoped_nsprotocol<Class> _clientClass; |
} |
@@ -18,13 +22,13 @@ |
- (instancetype)initWithClass:(Class)clientClass { |
if (self = [super init]) { |
DCHECK([clientClass isSubclassOfClass:[CRNForwardingNetworkClient class]]); |
- _clientClass.reset([clientClass retain]); |
+ _clientClass.reset(clientClass); |
} |
return self; |
} |
- (CRNForwardingNetworkClient*)clientHandlingAnyRequest { |
- return [[[_clientClass alloc] init] autorelease]; |
+ return [[_clientClass alloc] init]; |
} |
- (Class)clientClass { |