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..45bc49100b6256c717aa83f41e7ef2bd38583662 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 querySSLStatusForTrust:host:completionHandler:. |
| +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 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 provides web::SecurityStyle and net::CertStatus for the given |
|
davidben
2015/10/07 20:16:29
("Asynchronously" is currently not true. See comme
Eugene But (OOO till 7-30)
2015/10/08 16:53:32
Fixed behavior, thanks!
|
| +// |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 |