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

Side by Side Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1443083002: [ios] Signal load cancelled after presenting SSL interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years, 1 month 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/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
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
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
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