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

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

Issue 2669123003: iOS: Mark HTTP pages with credit card fields with an omnibox icon. (Closed)
Patch Set: Add CRWWebController test. Created 3 years, 11 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
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 7222d3dfc1cb51ceeef36b4df87f125ea28076dd..4df0d6a7b8424aa6310b9d4fb3631c60b4c301f2 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -4269,6 +4269,15 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[self didUpdateSSLStatusForCurrentNavigationItem];
}
+- (void)didShowCreditCardInputOnHTTP {
+ DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL()));
+ web::NavigationItem* item =
+ self.webState->GetNavigationManager()->GetLastCommittedItem();
+ item->GetSSL().content_status |=
+ web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP;
+ [self didUpdateSSLStatusForCurrentNavigationItem];
+}
+
- (void)handleSSLCertError:(NSError*)error {
CHECK(web::IsWKWebViewSSLCertError(error));

Powered by Google App Engine
This is Rietveld 408576698