Fix breakages in https://codereview.chromium.org/1155713003/
[chromium-blink-merge.git] / ios / web / web_state / wk_web_view_ssl_error_util.h
bloba9610e5df22db0a0098e098e89e82040c9a797a4
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_
6 #define IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_
8 #import <Foundation/Foundation.h>
10 namespace net {
11 class SSLInfo;
14 namespace web {
16 // NSErrorPeerCertificateChainKey from NSError's userInfo dict.
17 extern NSString* const kNSErrorPeerCertificateChainKey;
19 // Returns YES if geven error is a SSL error.
20 BOOL IsWKWebViewSSLError(NSError* error);
22 // Fills SSLInfo object with information extracted from |error|. Callers are
23 // responsible to ensure that given |error| is an SSL error by calling
24 // |web::IsSSLError| function.
25 void GetSSLInfoFromWKWebViewSSLError(NSError* error, net::SSLInfo* ssl_info);
27 } // namespace web
29 #endif // IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_