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

Unified Diff: ios/net/crn_http_protocol_handler.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/crn_http_protocol_handler.mm
diff --git a/ios/net/crn_http_protocol_handler.mm b/ios/net/crn_http_protocol_handler.mm
index 0555ab7c45bfe0d22b84e0dced9d2ab923c12511..40fb05cd12a0eea8591670e90eb5352c8db0393f 100644
--- a/ios/net/crn_http_protocol_handler.mm
+++ b/ios/net/crn_http_protocol_handler.mm
@@ -40,6 +40,10 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace net {
class HttpProtocolHandlerCore;
}
@@ -551,9 +555,9 @@ void HttpProtocolHandlerCore::OnReadCompleted(URLRequest* request,
if ([data length] > 0) {
// If the data is not encoded in UTF8, the NSString is nil.
DVLOG(3) << "To client:" << std::endl
- << base::SysNSStringToUTF8([[[NSString alloc]
+ << base::SysNSStringToUTF8([[NSString alloc]
initWithData:data
- encoding:NSUTF8StringEncoding] autorelease]);
+ encoding:NSUTF8StringEncoding]);
[top_level_client_ didLoadData:data];
}
if (bytes_read == 0) {
@@ -1064,7 +1068,6 @@ void HttpProtocolHandlerCore::PushClients(NSArray* clients) {
- (void)dealloc {
[self scheduleCancelRequest];
- [super dealloc];
}
#pragma mark NSURLProtocol overrides.
« no previous file with comments | « ios/net/cookies/system_cookie_util.mm ('k') | ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698