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

Unified Diff: ios/net/crn_http_protocol_handler_proxy_with_client_thread.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
« no previous file with comments | « ios/net/crn_http_protocol_handler.mm ('k') | ios/net/crn_http_url_response.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
diff --git a/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm b/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
index 39f28f5ea589acf540dd3673e7d6180c466afab6..1e110f45cbe86a122ff6c8ace078574d83d119e3 100644
--- a/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
+++ b/ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm
@@ -13,6 +13,10 @@
#include "net/base/auth.h"
#include "net/url_request/url_request.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// When the protocol is invalidated, no synchronization (lock) is needed:
// - The actual calls to the protocol and its invalidation are all done on
// clientThread_ and thus are serialized.
@@ -73,9 +77,9 @@
// hope that our tasks are executed even if the client thread changes mode
// later on.
if ([mode isEqualToString:NSRunLoopCommonModes])
- _runLoopModes.reset([@[ NSRunLoopCommonModes ] retain]);
+ _runLoopModes.reset(@[ NSRunLoopCommonModes ]);
else
- _runLoopModes.reset([@[ mode, NSRunLoopCommonModes ] retain]);
+ _runLoopModes.reset(@[ mode, NSRunLoopCommonModes ]);
_queuedInvocations.reset([[NSMutableArray alloc] init]);
}
return self;
@@ -126,7 +130,7 @@
size_t arg_index = 2;
va_list args;
va_start(args, aSelector);
- NSObject* arg = va_arg(args, NSObject*);
+ __unsafe_unretained NSObject* arg = va_arg(args, NSObject*);
while (arg != nil) {
[inv setArgument:&arg atIndex:arg_index];
arg = va_arg(args, NSObject*);
« no previous file with comments | « ios/net/crn_http_protocol_handler.mm ('k') | ios/net/crn_http_url_response.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698