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

Unified Diff: ios/web/web_state/wk_web_view_ssl_error_util.h

Issue 988383002: Upstream various ios/web utilities and helpers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-public-upstreaming
Patch Set: Created 5 years, 9 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
Index: ios/web/web_state/wk_web_view_ssl_error_util.h
diff --git a/ios/web/web_state/wk_web_view_ssl_error_util.h b/ios/web/web_state/wk_web_view_ssl_error_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..a9610e5df22db0a0098e098e89e82040c9a797a4
--- /dev/null
+++ b/ios/web/web_state/wk_web_view_ssl_error_util.h
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_
+#define IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_
+
+#import <Foundation/Foundation.h>
+
+namespace net {
+class SSLInfo;
+}
+
+namespace web {
+
+// NSErrorPeerCertificateChainKey from NSError's userInfo dict.
+extern NSString* const kNSErrorPeerCertificateChainKey;
+
+// Returns YES if geven error is a SSL error.
+BOOL IsWKWebViewSSLError(NSError* error);
+
+// Fills SSLInfo object with information extracted from |error|. Callers are
+// responsible to ensure that given |error| is an SSL error by calling
+// |web::IsSSLError| function.
+void GetSSLInfoFromWKWebViewSSLError(NSError* error, net::SSLInfo* ssl_info);
+
+} // namespace web
+
+#endif // IOS_WEB_WEB_STATE_WK_WEB_VIEW_SSL_ERROR_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698