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

Unified Diff: ios/net/clients/crn_simple_network_client_factory.mm

Issue 2489533003: [ObjC ARC] Converts ios/net to ARC. (Closed)
Patch Set: Created 4 years, 1 month 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/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 {
« no previous file with comments | « ios/net/clients/crn_forwarding_network_client_factory.mm ('k') | ios/net/cookies/cookie_creation_time_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698