| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ios/chrome/browser/ssl/ios_ssl_error_handler.h" | 5 #include "ios/chrome/browser/ssl/ios_ssl_error_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "components/security_interstitials/core/ssl_error_ui.h" | 9 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 10 #include "ios/chrome/browser/ssl/ios_ssl_blocking_page.h" | 10 #include "ios/chrome/browser/ssl/ios_ssl_blocking_page.h" |
| 11 #import "ios/web/public/web_state/web_state.h" | 11 #import "ios/web/public/web_state/web_state.h" |
| 12 #include "net/ssl/ssl_info.h" | 12 #include "net/ssl/ssl_info.h" |
| 13 | 13 |
| 14 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 15 #error "This file requires ARC support." |
| 16 #endif |
| 17 |
| 14 // static | 18 // static |
| 15 void IOSSSLErrorHandler::HandleSSLError( | 19 void IOSSSLErrorHandler::HandleSSLError( |
| 16 web::WebState* web_state, | 20 web::WebState* web_state, |
| 17 int cert_error, | 21 int cert_error, |
| 18 const net::SSLInfo& info, | 22 const net::SSLInfo& info, |
| 19 const GURL& request_url, | 23 const GURL& request_url, |
| 20 bool overridable, | 24 bool overridable, |
| 21 const base::Callback<void(bool)>& callback) { | 25 const base::Callback<void(bool)>& callback) { |
| 22 DCHECK(!web_state->IsShowingWebInterstitial()); | 26 DCHECK(!web_state->IsShowingWebInterstitial()); |
| 23 | 27 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 34 page->Show(); | 38 page->Show(); |
| 35 } | 39 } |
| 36 | 40 |
| 37 // static | 41 // static |
| 38 void IOSSSLErrorHandler::InterstitialWasDismissed( | 42 void IOSSSLErrorHandler::InterstitialWasDismissed( |
| 39 web::WebState* web_state, | 43 web::WebState* web_state, |
| 40 const base::Callback<void(bool)>& callback, | 44 const base::Callback<void(bool)>& callback, |
| 41 bool proceed) { | 45 bool proceed) { |
| 42 callback.Run(proceed); | 46 callback.Run(proceed); |
| 43 } | 47 } |
| OLD | NEW |