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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2146763003: [ios] Cleaned up deprecated SSLError delegate method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 847c3a69eda9aae9ed46f97cf7d3793afc5ef224..c00a6a52fb995d7d81e0a44c4549368ac73b0c77 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -4506,11 +4506,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
net::SSLInfo info;
web::GetSSLInfoFromWKWebViewSSLCertError(error, &info);
- // TODO(crbug.com/602298): Remove |status| variable, once |presentSSLError:|
- // callback is dropped.
- web::SSLStatus status;
- status.security_style = web::SECURITY_STYLE_AUTHENTICATION_BROKEN;
- status.cert_status = info.cert_status;
if (!info.cert) {
// |info.cert| can be null if certChain in NSError is empty or can not be
// parsed, in this case do not ask delegate if error should be allowed, it
@@ -4519,8 +4514,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
return;
}
- status.cert_id = web::CertStore::GetInstance()->StoreCert(info.cert.get(),
- self.certGroupID);
+ web::CertStore::GetInstance()->StoreCert(info.cert.get(), self.certGroupID);
// Retrieve verification results from _certVerificationErrors cache to avoid
// unnecessary recalculations. Verification results are cached for the leaf
@@ -4542,7 +4536,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
bool cacheHit = error != _certVerificationErrors->end();
if (cacheHit) {
recoverable = error->second.is_recoverable;
- status.cert_status = error->second.status;
info.cert_status = error->second.status;
}
UMA_HISTOGRAM_BOOLEAN("WebController.CertVerificationErrorsCacheHit",
@@ -4551,35 +4544,19 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
// Present SSL interstitial and inform everyone that the load is cancelled.
- void (^proceedBlock)() = ^{
- DCHECK(recoverable);
- // The interstitial will be removed during reload.
- [_certVerificationController allowCert:leafCert
- forHost:host
- status:status.cert_status];
- [self loadCurrentURL];
- };
- // TODO(crbug.com/602298): Remove SSL error API from CRWWebDelegate.
- if ([self.delegate respondsToSelector:@selector(presentSSLError:
- forSSLStatus:
- recoverable:
- callback:)]) {
- [self.delegate presentSSLError:info
- forSSLStatus:status
- recoverable:recoverable
- callback:^(BOOL proceed) {
- if (proceed)
- proceedBlock();
- }];
- } else {
- web::GetWebClient()->AllowCertificateError(
- self.webState, net::MapCertStatusToNetError(info.cert_status), info,
- net::GURLWithNSURL(requestURL), recoverable,
- base::BindBlock(^(bool proceed) {
- if (proceed)
- proceedBlock();
- }));
- }
+ web::GetWebClient()->AllowCertificateError(
marq (ping after 24h) 2016/07/18 09:34:13 nit: It's not clear what part of this call induces
Eugene But (OOO till 7-30) 2016/07/18 15:44:17 Good point. Updated the comment to be more generic
+ self.webState, net::MapCertStatusToNetError(info.cert_status), info,
+ net::GURLWithNSURL(requestURL), recoverable,
+ base::BindBlock(^(bool proceed) {
+ if (proceed) {
+ DCHECK(recoverable);
+ // The interstitial will be removed during reload.
+ [_certVerificationController allowCert:leafCert
+ forHost:host
+ status:info.cert_status];
+ [self loadCurrentURL];
+ }
+ }));
[self didUpdateSSLStatusForCurrentNavigationItem];
[self loadCancelled];
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698