Chromium Code Reviews| Index: ios/web/net/crw_cert_verification_controller.h |
| diff --git a/ios/web/net/crw_cert_verification_controller.h b/ios/web/net/crw_cert_verification_controller.h |
| index 06ff635836431f0de9110a33a1eacc180028b721..321d78a43994309a52c92709f5640f71c32ac5d6 100644 |
| --- a/ios/web/net/crw_cert_verification_controller.h |
| +++ b/ios/web/net/crw_cert_verification_controller.h |
| @@ -8,6 +8,7 @@ |
| #import <Foundation/Foundation.h> |
| #import "base/memory/ref_counted.h" |
| +#include "ios/web/public/security_style.h" |
| #include "net/cert/cert_status_flags.h" |
| namespace net { |
| @@ -32,6 +33,8 @@ typedef NS_ENUM(NSInteger, CertAcceptPolicy) { |
| // Completion handler called by decidePolicyForCert:host:completionHandler:. |
| typedef void (^PolicyDecisionHandler)(web::CertAcceptPolicy, net::CertStatus); |
| +// Completion handler called by decidePolicyForCert:host:completionHandler:. |
| +typedef void (^StatusQueryHandler)(web::SecurityStyle, net::CertStatus); |
| } // namespace web |
| @@ -49,14 +52,22 @@ typedef void (^PolicyDecisionHandler)(web::CertAcceptPolicy, net::CertStatus); |
| // TODO(eugenebut): add API for: |
| // - accepting bad SSL cert using CertPolicyCache |
| -// - querying SSL cert status for Navigation Item |
| // Decides the policy for the given |cert| for the given |host| and calls |
| -// |completionHandler| on completion. |completionHandler| cannot be null and |
| -// will be called synchronously or asynchronously on UI thread. |
| +// |completionHandler| on completion. |host| should be in DNS form |
| +// (f.e. for "http://名がドメイン.com", it should be "xn--v8jxj3d1dzdz08w.com"). |
| +// |completionHandler| cannot be null and will be called synchronously or |
| +// asynchronously on UI thread. |
|
stuartmorgan
2015/09/22 20:30:27
the UI thread
Eugene But (OOO till 7-30)
2015/09/22 22:43:04
Done.
|
| - (void)decidePolicyForCert:(const scoped_refptr<net::X509Certificate>&)cert |
| host:(NSString*)host |
| - completionHandler:(web::PolicyDecisionHandler)handler; |
| + completionHandler:(web::PolicyDecisionHandler)completionHandler; |
| + |
| +// Asynchronously returns web::SecurityStyle and net::CertStatus for the given |
| +// |certificateChain| (an NSArray of SecSertificateRef objects) and |host|. |
| +// |certificateChain| cannot be null or empty. |host| should be in DNS form. |
| +- (void)querySSLStatusForCertChain:(NSArray*)certChain |
| + host:(NSString*)host |
| + completionHandler:(web::StatusQueryHandler)completionHandler; |
| // Cancels all pending verification requests. Completion handlers will not be |
| // called after |shutDown| call. Must always be called before object's |