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

Unified Diff: ios/web/shell/view_controller.mm

Issue 1358033002: iOS Web Shell: Implemented warning dialog for invalid SSL certs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/Cancel/Go Back Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/view_controller.mm
diff --git a/ios/web/shell/view_controller.mm b/ios/web/shell/view_controller.mm
index c15bf1cdcb415760877763aa8a707433cee44c9e..39fc2eff155589b9dcdba458f1413d0c9520b8ce 100644
--- a/ios/web/shell/view_controller.mm
+++ b/ios/web/shell/view_controller.mm
@@ -293,11 +293,31 @@ bool UseWKWebView() {
- (BOOL)openExternalURL:(const GURL&)url {
return NO;
}
+
- (void)presentSSLError:(const net::SSLInfo&)info
forSSLStatus:(const web::SSLStatus&)status
recoverable:(BOOL)recoverable
callback:(SSLErrorCallback)shouldContinue {
+ UIAlertController* alert = [UIAlertController
+ alertControllerWithTitle:@"Your connection is not private"
+ message:nil
+ preferredStyle:UIAlertControllerStyleActionSheet];
+ [alert addAction:[UIAlertAction actionWithTitle:@"Go Back"
+ style:UIAlertActionStyleCancel
+ handler:^(UIAlertAction*) {
+ shouldContinue(NO);
+ }]];
+
+ if (recoverable) {
+ [alert addAction:[UIAlertAction actionWithTitle:@"Continue"
+ style:UIAlertActionStyleDefault
+ handler:^(UIAlertAction*) {
+ shouldContinue(YES);
+ }]];
+ }
+ [self presentViewController:alert animated:YES completion:nil];
}
+
- (void)presentSpoofingError {
}
- (void)webLoadCancelled:(const GURL&)url {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698