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

Unified Diff: ios/net/protocol_handler_util.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/nsurlrequest_util.mm ('k') | ios/net/request_tracker.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/net/protocol_handler_util.mm
diff --git a/ios/net/protocol_handler_util.mm b/ios/net/protocol_handler_util.mm
index b9b215213ce293fa74e4643b13c2fbf4da380f9f..4735b274772d5133e8f69d0aa5a76aafc9ef9c46 100644
--- a/ios/net/protocol_handler_util.mm
+++ b/ios/net/protocol_handler_util.mm
@@ -25,6 +25,10 @@
#if !BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
#include "base/i18n/encoding_detection.h" // nogncheck
#include "base/i18n/icu_string_conversions.h" // nogncheck
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
#endif // !BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
namespace {
@@ -84,10 +88,10 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) {
// The default iOS stack computes the length of the decoded string. If we
// wanted to do that we would have to decode the string now. However, using
// the unknown length (-1) seems to be working.
- return [[[NSURLResponse alloc] initWithURL:url
- MIMEType:mime_type
- expectedContentLength:-1
- textEncodingName:charset] autorelease];
+ return [[NSURLResponse alloc] initWithURL:url
+ MIMEType:mime_type
+ expectedContentLength:-1
+ textEncodingName:charset];
} else {
// Iterate over all the headers and copy them.
bool has_content_type_header = false;
@@ -173,10 +177,10 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) {
http_version.minor_value()];
}
- return [[[CRNHTTPURLResponse alloc] initWithURL:url
- statusCode:request->GetResponseCode()
- HTTPVersion:version_string
- headerFields:header_fields] autorelease];
+ return [[CRNHTTPURLResponse alloc] initWithURL:url
+ statusCode:request->GetResponseCode()
+ HTTPVersion:version_string
+ headerFields:header_fields];
}
}
« no previous file with comments | « ios/net/nsurlrequest_util.mm ('k') | ios/net/request_tracker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698