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

Side by Side 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, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web/shell/view_controller.h" 5 #import "ios/web/shell/view_controller.h"
6 6
7 #include "base/mac/objc_property_releaser.h" 7 #include "base/mac/objc_property_releaser.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 - (void)webPageOrderedClose { 287 - (void)webPageOrderedClose {
288 } 288 }
289 - (void)goDelta:(int)delta { 289 - (void)goDelta:(int)delta {
290 } 290 }
291 - (void)openURLWithParams:(const web::WebState::OpenURLParams&)params { 291 - (void)openURLWithParams:(const web::WebState::OpenURLParams&)params {
292 } 292 }
293 - (BOOL)openExternalURL:(const GURL&)url { 293 - (BOOL)openExternalURL:(const GURL&)url {
294 return NO; 294 return NO;
295 } 295 }
296
296 - (void)presentSSLError:(const net::SSLInfo&)info 297 - (void)presentSSLError:(const net::SSLInfo&)info
297 forSSLStatus:(const web::SSLStatus&)status 298 forSSLStatus:(const web::SSLStatus&)status
298 recoverable:(BOOL)recoverable 299 recoverable:(BOOL)recoverable
299 callback:(SSLErrorCallback)shouldContinue { 300 callback:(SSLErrorCallback)shouldContinue {
301 UIAlertController* alert = [UIAlertController
302 alertControllerWithTitle:@"Your connection is not private"
303 message:nil
304 preferredStyle:UIAlertControllerStyleActionSheet];
305 [alert addAction:[UIAlertAction actionWithTitle:@"Go Back"
306 style:UIAlertActionStyleCancel
307 handler:^(UIAlertAction*) {
308 shouldContinue(NO);
309 }]];
310
311 if (recoverable) {
312 [alert addAction:[UIAlertAction actionWithTitle:@"Continue"
313 style:UIAlertActionStyleDefault
314 handler:^(UIAlertAction*) {
315 shouldContinue(YES);
316 }]];
317 }
318 [self presentViewController:alert animated:YES completion:nil];
300 } 319 }
320
301 - (void)presentSpoofingError { 321 - (void)presentSpoofingError {
302 } 322 }
303 - (void)webLoadCancelled:(const GURL&)url { 323 - (void)webLoadCancelled:(const GURL&)url {
304 } 324 }
305 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl { 325 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl {
306 } 326 }
307 - (void)webController:(CRWWebController*)webController 327 - (void)webController:(CRWWebController*)webController
308 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block { 328 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block {
309 } 329 }
310 - (void)webController:(CRWWebController*)webController 330 - (void)webController:(CRWWebController*)webController
(...skipping 15 matching lines...) Expand all
326 - (void)webDidPrepareForGoBack { 346 - (void)webDidPrepareForGoBack {
327 } 347 }
328 - (int)downloadImageAtUrl:(const GURL&)url 348 - (int)downloadImageAtUrl:(const GURL&)url
329 maxBitmapSize:(uint32_t)maxBitmapSize 349 maxBitmapSize:(uint32_t)maxBitmapSize
330 callback: 350 callback:
331 (const web::WebState::ImageDownloadCallback&)callback { 351 (const web::WebState::ImageDownloadCallback&)callback {
332 return -1; 352 return -1;
333 } 353 }
334 354
335 @end 355 @end
OLDNEW
« 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