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

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

Issue 2466143002: iOS: Mark HTTP pages with password fields with an omnibox icon. (Closed)
Patch Set: IsOriginSecure() Created 4 years 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 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after
4583 } 4583 }
4584 4584
4585 - (void)didUpdateSSLStatusForCurrentNavigationItem { 4585 - (void)didUpdateSSLStatusForCurrentNavigationItem {
4586 if ([_delegate respondsToSelector: 4586 if ([_delegate respondsToSelector:
4587 @selector( 4587 @selector(
4588 webControllerDidUpdateSSLStatusForCurrentNavigationItem:)]) { 4588 webControllerDidUpdateSSLStatusForCurrentNavigationItem:)]) {
4589 [_delegate webControllerDidUpdateSSLStatusForCurrentNavigationItem:self]; 4589 [_delegate webControllerDidUpdateSSLStatusForCurrentNavigationItem:self];
4590 } 4590 }
4591 } 4591 }
4592 4592
4593 - (void)didShowPasswordInputOnHTTP {
4594 web::NavigationItem* item =
4595 self.webState->GetNavigationManager()->GetLastCommittedItem();
4596 item->GetSSL().content_status |=
Eugene But (OOO till 7-30) 2016/12/02 01:53:12 Do you want to DCHECK that origin is not secure?
lgarron 2016/12/06 01:38:36 Good idea; done.
4597 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP;
4598 [self didUpdateSSLStatusForCurrentNavigationItem];
4599 }
4600
4593 - (void)handleSSLCertError:(NSError*)error { 4601 - (void)handleSSLCertError:(NSError*)error {
4594 CHECK(web::IsWKWebViewSSLCertError(error)); 4602 CHECK(web::IsWKWebViewSSLCertError(error));
4595 4603
4596 net::SSLInfo info; 4604 net::SSLInfo info;
4597 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info); 4605 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info);
4598 4606
4599 if (!info.cert) { 4607 if (!info.cert) {
4600 // |info.cert| can be null if certChain in NSError is empty or can not be 4608 // |info.cert| can be null if certChain in NSError is empty or can not be
4601 // parsed, in this case do not ask delegate if error should be allowed, it 4609 // parsed, in this case do not ask delegate if error should be allowed, it
4602 // should not be. 4610 // should not be.
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
5768 } 5776 }
5769 5777
5770 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5778 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5771 } 5779 }
5772 5780
5773 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5781 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5774 return [action.request valueForHTTPHeaderField:@"Referer"]; 5782 return [action.request valueForHTTPHeaderField:@"Referer"];
5775 } 5783 }
5776 5784
5777 @end 5785 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698