Index: ios/chrome/browser/ssl/ios_ssl_error_handler.h |
diff --git a/ios/chrome/browser/ssl/ios_ssl_error_handler.h b/ios/chrome/browser/ssl/ios_ssl_error_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8e96528eee068afd9b0b9ecdd475777fb39de171 |
--- /dev/null |
+++ b/ios/chrome/browser/ssl/ios_ssl_error_handler.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2016 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_CHROME_BROWSER_SSL_IOS_SSL_ERROR_HANDLER_H_ |
+#define IOS_CHROME_BROWSER_SSL_IOS_SSL_ERROR_HANDLER_H_ |
+ |
+#include "base/callback.h" |
+#include "url/gurl.h" |
+ |
+namespace net { |
+class SSLInfo; |
+} // namespace net |
+ |
+namespace web { |
+class WebState; |
+} // namespace web |
+ |
+// This class is responsible for deciding what type of interstitial to show for |
+// an SSL validation error. |
+class IOSSSLErrorHandler { |
+ public: |
+ // Entry point for the class. |
+ static void HandleSSLError(web::WebState* web_state, |
estark
2016/06/29 23:00:15
I'm not sure what the prevailing style is on ios,
Eugene But (OOO till 7-30)
2016/06/30 00:05:26
No it's not prevailing style on iOS, and I do agre
estark
2016/06/30 17:02:04
SSLErrorHandler has non-static protected/private m
|
+ int cert_error, |
+ const net::SSLInfo& info, |
+ const GURL& request_url, |
+ bool overridable, |
+ const base::Callback<void(bool)>& callback); |
+ |
+ private: |
+ IOSSSLErrorHandler(); |
+ ~IOSSSLErrorHandler(); |
+ // Called on SSL interstitial dismissal. |
+ static void InterstitialWasDismissed( |
+ web::WebState* web_state, |
+ const base::Callback<void(bool)>& callback, |
+ bool proceed); |
+}; |
+ |
+#endif // IOS_CHROME_BROWSER_SSL_IOS_SSL_ERROR_HANDLER_H_ |