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

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

Issue 2935933003: [ObjC ARC] Converts ios/web:ios_web_web_state_unittests to ARC. (Closed)
Patch Set: Review fixes. 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_unittest.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_unittest.mm
diff --git a/ios/web/web_state/wk_web_view_security_util_unittest.mm b/ios/web/web_state/wk_web_view_security_util_unittest.mm
index d7d77d36ad9c035ae5afc5391a08023548a41b0d..d9ca55a9913efc19d1946ecb24518fc30e30dda2 100644
--- a/ios/web/web_state/wk_web_view_security_util_unittest.mm
+++ b/ios/web/web_state/wk_web_view_security_util_unittest.mm
@@ -9,6 +9,7 @@
#include <memory>
+#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "crypto/rsa_private_key.h"
#include "net/cert/x509_cert_types.h"
@@ -20,6 +21,10 @@
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace web {
namespace {
// Subject for testing self-signed certificate.
@@ -42,8 +47,7 @@ NSArray* MakeTestCertChain(const std::string& subject) {
reinterpret_cast<const uint8_t*>(der_cert.data()), der_cert.size()));
if (!cert)
return nullptr;
- NSArray* result = @[ reinterpret_cast<id>(cert.get()) ];
- return result;
+ return @[ (__bridge id)cert.get() ];
}
// Returns an autoreleased dictionary, which represents NSError's user info for
@@ -58,7 +62,8 @@ NSDictionary* MakeTestSSLCertErrorUserInfo() {
base::ScopedCFTypeRef<SecTrustRef> CreateTestTrust(NSArray* cert_chain) {
base::ScopedCFTypeRef<SecPolicyRef> policy(SecPolicyCreateBasicX509());
SecTrustRef trust = nullptr;
- SecTrustCreateWithCertificates(cert_chain, policy, &trust);
+ SecTrustCreateWithCertificates(base::mac::NSToCFCast(cert_chain), policy,
+ &trust);
return base::ScopedCFTypeRef<SecTrustRef>(trust);
}
« no previous file with comments | « ios/web/web_state/web_view_internal_creation_util_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698