OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/web_state/ui/crw_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_web_controller.h" |
6 | 6 |
7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
8 | 8 |
9 #import <objc/runtime.h> | 9 #import <objc/runtime.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3429 _lastUserInteraction->time > _lastTransferTimeInSeconds && | 3429 _lastUserInteraction->time > _lastTransferTimeInSeconds && |
3430 timeSinceInteraction >= 0.0; | 3430 timeSinceInteraction >= 0.0; |
3431 } else { | 3431 } else { |
3432 // If the error does not have timing information, check if the user | 3432 // If the error does not have timing information, check if the user |
3433 // interacted with the page recently. | 3433 // interacted with the page recently. |
3434 userInteracted = [self userIsInteracting]; | 3434 userInteracted = [self userIsInteracting]; |
3435 } | 3435 } |
3436 if (!inMainFrame && !userInteracted) | 3436 if (!inMainFrame && !userInteracted) |
3437 return; | 3437 return; |
3438 | 3438 |
| 3439 // Reset SSL status to default. |
| 3440 web::NavigationManager* navManager = self.webState->GetNavigationManager(); |
| 3441 if (navManager->GetLastCommittedItem()) |
| 3442 navManager->GetLastCommittedItem()->GetSSL() = web::SSLStatus(); |
| 3443 |
3439 NSURL* errorURL = [NSURL | 3444 NSURL* errorURL = [NSURL |
3440 URLWithString:[userInfo objectForKey:NSURLErrorFailingURLStringErrorKey]]; | 3445 URLWithString:[userInfo objectForKey:NSURLErrorFailingURLStringErrorKey]]; |
3441 const GURL errorGURL = net::GURLWithNSURL(errorURL); | 3446 const GURL errorGURL = net::GURLWithNSURL(errorURL); |
3442 | 3447 |
3443 // Handles Frame Load Interrupted errors from WebView. | 3448 // Handles Frame Load Interrupted errors from WebView. |
3444 if ([error.domain isEqual:base::SysUTF8ToNSString(web::kWebKitErrorDomain)] && | 3449 if ([error.domain isEqual:base::SysUTF8ToNSString(web::kWebKitErrorDomain)] && |
3445 error.code == web::kWebKitErrorFrameLoadInterruptedByPolicyChange) { | 3450 error.code == web::kWebKitErrorFrameLoadInterruptedByPolicyChange) { |
3446 // See if the delegate wants to handle this case. | 3451 // See if the delegate wants to handle this case. |
3447 if (errorGURL.is_valid() && | 3452 if (errorGURL.is_valid() && |
3448 [_delegate | 3453 [_delegate |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5650 } | 5655 } |
5651 | 5656 |
5652 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5657 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
5653 } | 5658 } |
5654 | 5659 |
5655 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5660 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
5656 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5661 return [action.request valueForHTTPHeaderField:@"Referer"]; |
5657 } | 5662 } |
5658 | 5663 |
5659 @end | 5664 @end |
OLD | NEW |