OLD | NEW |
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/web_state/ui/crw_wk_web_view_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" |
6 | 6 |
7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
8 | 8 |
9 #include "base/containers/mru_cache.h" | 9 #include "base/containers/mru_cache.h" |
10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 {leafCert, base::SysNSStringToUTF8(host)}); | 964 {leafCert, base::SysNSStringToUTF8(host)}); |
965 if (error != _certVerificationErrors->end()) { | 965 if (error != _certVerificationErrors->end()) { |
966 status.cert_status = error->second.status; | 966 status.cert_status = error->second.status; |
967 recoverable = error->second.is_recoverable; | 967 recoverable = error->second.is_recoverable; |
968 } else { | 968 } else { |
969 // TODO(eugenebut): Report UMA with cache size (crbug.com/541736). | 969 // TODO(eugenebut): Report UMA with cache size (crbug.com/541736). |
970 } | 970 } |
971 } | 971 } |
972 } | 972 } |
973 | 973 |
974 // Present SSL interstitial. | 974 // Present SSL interstitial and inform everyone that the load is cancelled. |
975 [self.delegate presentSSLError:info | 975 [self.delegate presentSSLError:info |
976 forSSLStatus:status | 976 forSSLStatus:status |
977 recoverable:recoverable | 977 recoverable:recoverable |
978 callback:^(BOOL proceed) { | 978 callback:^(BOOL proceed) { |
979 if (proceed) { | 979 if (proceed) { |
980 // The interstitial will be removed during reload. | 980 // The interstitial will be removed during reload. |
981 [_certVerificationController | 981 [_certVerificationController |
982 allowCert:leafCert | 982 allowCert:leafCert |
983 forHost:host | 983 forHost:host |
984 status:status.cert_status]; | 984 status:status.cert_status]; |
985 [self loadCurrentURL]; | 985 [self loadCurrentURL]; |
986 } | 986 } |
987 }]; | 987 }]; |
| 988 [self loadCancelled]; |
988 } | 989 } |
989 #endif // #if !defined(ENABLE_CHROME_NET_STACK_FOR_WKWEBVIEW) | 990 #endif // #if !defined(ENABLE_CHROME_NET_STACK_FOR_WKWEBVIEW) |
990 | 991 |
991 - (void)addActivityIndicatorTask { | 992 - (void)addActivityIndicatorTask { |
992 [[CRWNetworkActivityIndicatorManager sharedInstance] | 993 [[CRWNetworkActivityIndicatorManager sharedInstance] |
993 startNetworkTaskForGroup:[self activityIndicatorGroupID]]; | 994 startNetworkTaskForGroup:[self activityIndicatorGroupID]]; |
994 } | 995 } |
995 | 996 |
996 - (void)clearActivityIndicatorTasks { | 997 - (void)clearActivityIndicatorTasks { |
997 [[CRWNetworkActivityIndicatorManager sharedInstance] | 998 [[CRWNetworkActivityIndicatorManager sharedInstance] |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1817 runJavaScriptTextInputPanelWithPrompt:prompt | 1818 runJavaScriptTextInputPanelWithPrompt:prompt |
1818 defaultText:defaultText | 1819 defaultText:defaultText |
1819 requestURL:requestURL | 1820 requestURL:requestURL |
1820 completionHandler:completionHandler]; | 1821 completionHandler:completionHandler]; |
1821 } else if (completionHandler) { | 1822 } else if (completionHandler) { |
1822 completionHandler(nil); | 1823 completionHandler(nil); |
1823 } | 1824 } |
1824 } | 1825 } |
1825 | 1826 |
1826 @end | 1827 @end |
OLD | NEW |