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

Unified Diff: ios/web/web_state/wk_web_view_security_util.mm

Issue 2948673002: Revert of [ObjC ARC] Converts ios/web:web to ARC. (Closed)
Patch Set: Created 3 years, 6 months 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/web/web_state/web_view_internal_creation_util.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/wk_web_view_security_util.mm
diff --git a/ios/web/web_state/wk_web_view_security_util.mm b/ios/web/web_state/wk_web_view_security_util.mm
index c4d10574ae478ce1405be2b43bbb27bf19106f1e..5b7e446655eda9646d004b66b429f06330a91e8b 100644
--- a/ios/web/web_state/wk_web_view_security_util.mm
+++ b/ios/web/web_state/wk_web_view_security_util.mm
@@ -9,10 +9,6 @@
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util_ios.h"
#include "net/ssl/ssl_info.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
namespace web {
@@ -54,12 +50,10 @@
return nullptr;
std::vector<SecCertificateRef> intermediates;
for (NSUInteger i = 1; i < certs.count; i++) {
- SecCertificateRef cert = (__bridge SecCertificateRef)certs[i];
- intermediates.push_back(cert);
+ intermediates.push_back(reinterpret_cast<SecCertificateRef>(certs[i]));
}
- SecCertificateRef root_cert = (__bridge SecCertificateRef)certs[0];
return net::x509_util::CreateX509CertificateFromSecCertificate(
- reinterpret_cast<SecCertificateRef>(root_cert), intermediates);
+ reinterpret_cast<SecCertificateRef>(certs[0]), intermediates);
}
scoped_refptr<net::X509Certificate> CreateCertFromTrust(SecTrustRef trust) {
@@ -89,8 +83,8 @@
base::ScopedCFTypeRef<SecPolicyRef> policy(
SecPolicyCreateSSL(TRUE, static_cast<CFStringRef>(host)));
SecTrustRef ref_result = nullptr;
- if (SecTrustCreateWithCertificates((__bridge CFArrayRef)certs, policy,
- &ref_result) == errSecSuccess) {
+ if (SecTrustCreateWithCertificates(certs, policy, &ref_result) ==
+ errSecSuccess) {
scoped_result.reset(ref_result);
}
return scoped_result;
« no previous file with comments | « ios/web/web_state/web_view_internal_creation_util.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698