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

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

Issue 2451743002: [ObjC ARC] Converts the rest of ios/web to ARC. (Closed)
Patch Set: rebase 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/web/web_state/web_view_internal_creation_util.mm ('k') | no next file » | 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 5836fab7bedb1e82103805e815a5d325ac121e43..ff07ec1c23d22f3ff809c2467847c618211cc338 100644
--- a/ios/web/web_state/wk_web_view_security_util.mm
+++ b/ios/web/web_state/wk_web_view_security_util.mm
@@ -9,6 +9,10 @@
#include "net/cert/x509_certificate.h"
#include "net/ssl/ssl_info.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace web {
// These keys were determined by inspecting userInfo dict of an SSL error.
@@ -49,10 +53,10 @@ scoped_refptr<net::X509Certificate> CreateCertFromChain(NSArray* certs) {
return nullptr;
net::X509Certificate::OSCertHandles intermediates;
for (NSUInteger i = 1; i < certs.count; i++) {
- intermediates.push_back(reinterpret_cast<SecCertificateRef>(certs[i]));
+ intermediates.push_back((__bridge SecCertificateRef)certs[i]);
}
return net::X509Certificate::CreateFromHandle(
- reinterpret_cast<SecCertificateRef>(certs[0]), intermediates);
+ (__bridge SecCertificateRef)certs[0], intermediates);
}
scoped_refptr<net::X509Certificate> CreateCertFromTrust(SecTrustRef trust) {
@@ -82,8 +86,8 @@ base::ScopedCFTypeRef<SecTrustRef> CreateServerTrustFromChain(NSArray* certs,
base::ScopedCFTypeRef<SecPolicyRef> policy(
SecPolicyCreateSSL(TRUE, static_cast<CFStringRef>(host)));
SecTrustRef ref_result = nullptr;
- if (SecTrustCreateWithCertificates(certs, policy, &ref_result) ==
- errSecSuccess) {
+ if (SecTrustCreateWithCertificates((__bridge CFArrayRef)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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698