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..a6bae39d2a5394c7b87d18a1383324cf86dc09c9 100644 |
| --- a/ios/web/net/crw_cert_verification_controller.h |
| +++ b/ios/web/net/crw_cert_verification_controller.h |
| @@ -7,7 +7,9 @@ |
| #import <Foundation/Foundation.h> |
| +#include "base/mac/scoped_cftyperef.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 +34,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:. |
|
davidben
2015/10/05 22:19:10
querySSLStatusForTrust?
Eugene But (OOO till 7-30)
2015/10/06 03:10:09
Done.
|
| +typedef void (^StatusQueryHandler)(web::SecurityStyle, net::CertStatus); |
| } // namespace web |
| @@ -49,14 +53,21 @@ 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 ASCII compatible form |
| +// (e.g. for "http://名がドメイン.com", it should be "xn--v8jxj3d1dzdz08w.com"). |
| +// |completionHandler| cannot be null and will be called synchronously or |
| +// asynchronously on the UI thread. |
| - (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 |
| +// |serverTrust| and |host|. |host| should be in ASCII compatible form. |
| +- (void)querySSLStatusForTrust:(base::ScopedCFTypeRef<SecTrustRef>)serverTrust |
| + 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 |