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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 {leafCert, base::SysNSStringToUTF8(host)}); | 953 {leafCert, base::SysNSStringToUTF8(host)}); |
954 if (error != _certVerificationErrors->end()) { | 954 if (error != _certVerificationErrors->end()) { |
955 status.cert_status = error->second.status; | 955 status.cert_status = error->second.status; |
956 recoverable = error->second.is_recoverable; | 956 recoverable = error->second.is_recoverable; |
957 } else { | 957 } else { |
958 // TODO(eugenebut): Report UMA with cache size (crbug.com/541736). | 958 // TODO(eugenebut): Report UMA with cache size (crbug.com/541736). |
959 } | 959 } |
960 } | 960 } |
961 } | 961 } |
962 | 962 |
963 // Present SSL interstitial. | 963 // Present SSL interstitial and inform everyone that the load is cancelled. |
964 [self.delegate presentSSLError:info | 964 [self.delegate presentSSLError:info |
965 forSSLStatus:status | 965 forSSLStatus:status |
966 recoverable:recoverable | 966 recoverable:recoverable |
967 callback:^(BOOL proceed) { | 967 callback:^(BOOL proceed) { |
968 if (proceed) { | 968 if (proceed) { |
969 // The interstitial will be removed during reload. | 969 // The interstitial will be removed during reload. |
970 [_certVerificationController | 970 [_certVerificationController |
971 allowCert:leafCert | 971 allowCert:leafCert |
972 forHost:host | 972 forHost:host |
973 status:status.cert_status]; | 973 status:status.cert_status]; |
974 [self loadCurrentURL]; | 974 [self loadCurrentURL]; |
975 } | 975 } |
976 }]; | 976 }]; |
| 977 [self loadCancelled]; |
977 } | 978 } |
978 #endif // #if !defined(ENABLE_CHROME_NET_STACK_FOR_WKWEBVIEW) | 979 #endif // #if !defined(ENABLE_CHROME_NET_STACK_FOR_WKWEBVIEW) |
979 | 980 |
980 - (void)addActivityIndicatorTask { | 981 - (void)addActivityIndicatorTask { |
981 [[CRWNetworkActivityIndicatorManager sharedInstance] | 982 [[CRWNetworkActivityIndicatorManager sharedInstance] |
982 startNetworkTaskForGroup:[self activityIndicatorGroupID]]; | 983 startNetworkTaskForGroup:[self activityIndicatorGroupID]]; |
983 } | 984 } |
984 | 985 |
985 - (void)clearActivityIndicatorTasks { | 986 - (void)clearActivityIndicatorTasks { |
986 [[CRWNetworkActivityIndicatorManager sharedInstance] | 987 [[CRWNetworkActivityIndicatorManager sharedInstance] |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 placeholderText:defaultText | 1804 placeholderText:defaultText |
1804 requestURL: | 1805 requestURL: |
1805 net::GURLWithNSURL(frame.request.URL) | 1806 net::GURLWithNSURL(frame.request.URL) |
1806 completionHandler:completionHandler]; | 1807 completionHandler:completionHandler]; |
1807 } else if (completionHandler) { | 1808 } else if (completionHandler) { |
1808 completionHandler(nil); | 1809 completionHandler(nil); |
1809 } | 1810 } |
1810 } | 1811 } |
1811 | 1812 |
1812 @end | 1813 @end |
OLD | NEW |