| 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 81dd6e629220c078b2e7d23b102f4c48005a254e..bac5b8ec6711ef2c51b98c3d8a3811a474050250 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -747,8 +747,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
|
| // Updates SSL status for the current navigation item based on the information
|
| // provided by web view.
|
| - (void)updateSSLStatusForCurrentNavigationItem;
|
| -// Called when SSL status has been updated for the current navigation item.
|
| -- (void)didUpdateSSLStatusForCurrentNavigationItem;
|
| // Called when a load ends in an SSL error and certificate chain.
|
| - (void)handleSSLCertError:(NSError*)error;
|
|
|
| @@ -4045,30 +4043,22 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
| hasOnlySecureContent:hasOnlySecureContent];
|
| }
|
|
|
| -- (void)didUpdateSSLStatusForCurrentNavigationItem {
|
| - if ([_delegate respondsToSelector:
|
| - @selector(
|
| - webControllerDidUpdateSSLStatusForCurrentNavigationItem:)]) {
|
| - [_delegate webControllerDidUpdateSSLStatusForCurrentNavigationItem:self];
|
| - }
|
| -}
|
| -
|
| - (void)didShowPasswordInputOnHTTP {
|
| DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL()));
|
| web::NavigationItem* item =
|
| - self.webState->GetNavigationManager()->GetLastCommittedItem();
|
| + _webStateImpl->GetNavigationManager()->GetLastCommittedItem();
|
| item->GetSSL().content_status |=
|
| web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP;
|
| - [self didUpdateSSLStatusForCurrentNavigationItem];
|
| + _webStateImpl->OnVisibleSecurityStateChange();
|
| }
|
|
|
| - (void)didShowCreditCardInputOnHTTP {
|
| DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL()));
|
| web::NavigationItem* item =
|
| - self.webState->GetNavigationManager()->GetLastCommittedItem();
|
| + _webStateImpl->GetNavigationManager()->GetLastCommittedItem();
|
| item->GetSSL().content_status |=
|
| web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP;
|
| - [self didUpdateSSLStatusForCurrentNavigationItem];
|
| + _webStateImpl->OnVisibleSecurityStateChange();
|
| }
|
|
|
| - (void)handleSSLCertError:(NSError*)error {
|
| @@ -4114,7 +4104,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
|
|
| // Ask web client if this cert error should be allowed.
|
| web::GetWebClient()->AllowCertificateError(
|
| - self.webState, net::MapCertStatusToNetError(info.cert_status), info,
|
| + _webStateImpl, net::MapCertStatusToNetError(info.cert_status), info,
|
| net::GURLWithNSURL(requestURL), recoverable,
|
| base::BindBlock(^(bool proceed) {
|
| if (proceed) {
|
| @@ -4130,7 +4120,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
| }
|
| }));
|
|
|
| - [self didUpdateSSLStatusForCurrentNavigationItem];
|
| + _webStateImpl->OnVisibleSecurityStateChange();
|
| [self loadCancelled];
|
| }
|
|
|
| @@ -4797,9 +4787,9 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
| - (void)SSLStatusUpdater:(CRWSSLStatusUpdater*)SSLStatusUpdater
|
| didChangeSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem {
|
| web::NavigationItem* lastCommittedNavigationItem =
|
| - self.webState->GetNavigationManager()->GetLastCommittedItem();
|
| + _webStateImpl->GetNavigationManager()->GetLastCommittedItem();
|
| if (navigationItem == lastCommittedNavigationItem) {
|
| - [self didUpdateSSLStatusForCurrentNavigationItem];
|
| + _webStateImpl->OnVisibleSecurityStateChange();
|
| }
|
| }
|
|
|
|
|