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

Unified Diff: ios/chrome/browser/ssl/ios_ssl_error_handler.h

Issue 2108783005: [ios] Implemented iOS analogue of SSLErrorHandler class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 6 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
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/ssl/ios_ssl_error_handler.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..00dc12ea0b40391619e895b0e559c1ef354cc20d
--- /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_forward.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,
+ int cert_error,
+ const net::SSLInfo& info,
+ const GURL& request_url,
+ bool overridable,
+ const base::Callback<void(bool)>& callback);
+
+ private:
+ ~IOSSSLErrorHandler() = delete;
+ // Called on SSL interstitial dismissal.
+ static void InterstitialWasDismissed(
+ web::WebState* web_state,
+ const base::Callback<void(bool)>& callback,
+ bool proceed);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(IOSSSLErrorHandler);
+};
+
+#endif // IOS_CHROME_BROWSER_SSL_IOS_SSL_ERROR_HANDLER_H_
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/ssl/ios_ssl_error_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698