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

Side by Side 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: Update comments. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after
4271 4271
4272 - (void)didShowPasswordInputOnHTTP { 4272 - (void)didShowPasswordInputOnHTTP {
4273 DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL())); 4273 DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL()));
4274 web::NavigationItem* item = 4274 web::NavigationItem* item =
4275 self.webState->GetNavigationManager()->GetLastCommittedItem(); 4275 self.webState->GetNavigationManager()->GetLastCommittedItem();
4276 item->GetSSL().content_status |= 4276 item->GetSSL().content_status |=
4277 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP; 4277 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP;
4278 [self didUpdateSSLStatusForCurrentNavigationItem]; 4278 [self didUpdateSSLStatusForCurrentNavigationItem];
4279 } 4279 }
4280 4280
4281 - (void)didShowCreditCardInputOnHTTP {
4282 DCHECK(!web::IsOriginSecure(self.webState->GetLastCommittedURL()));
4283 web::NavigationItem* item =
4284 self.webState->GetNavigationManager()->GetLastCommittedItem();
4285 item->GetSSL().content_status |=
4286 web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP;
4287 [self didUpdateSSLStatusForCurrentNavigationItem];
4288 }
4289
4281 - (void)handleSSLCertError:(NSError*)error { 4290 - (void)handleSSLCertError:(NSError*)error {
4282 CHECK(web::IsWKWebViewSSLCertError(error)); 4291 CHECK(web::IsWKWebViewSSLCertError(error));
4283 4292
4284 net::SSLInfo info; 4293 net::SSLInfo info;
4285 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info); 4294 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info);
4286 4295
4287 if (!info.cert) { 4296 if (!info.cert) {
4288 // |info.cert| can be null if certChain in NSError is empty or can not be 4297 // |info.cert| can be null if certChain in NSError is empty or can not be
4289 // parsed, in this case do not ask delegate if error should be allowed, it 4298 // parsed, in this case do not ask delegate if error should be allowed, it
4290 // should not be. 4299 // should not be.
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
5448 } 5457 }
5449 5458
5450 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5459 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5451 } 5460 }
5452 5461
5453 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5462 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5454 return [action.request valueForHTTPHeaderField:@"Referer"]; 5463 return [action.request valueForHTTPHeaderField:@"Referer"];
5455 } 5464 }
5456 5465
5457 @end 5466 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.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