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

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: iOS HTTP Bad. 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)didShowSensitiveInputOnHttp {
4594 // TODO: Get the current item, not the visible item.
lgarron 2016/11/29 03:48:49 The implementation of webControllerDidUpdateSSLSta
Eugene But (OOO till 7-30) 2016/11/30 17:58:41 Tab uses transient item to exit from fullscreen if
lgarron 2016/12/02 01:21:52 Desktop uses LastCommittedEntry() [1]. Ive updated
Eugene But (OOO till 7-30) 2016/12/02 01:53:11 There is no ned to change Tab. It uses pending ent
4595 web::NavigationItem* item =
4596 self.webState->GetNavigationManager()->GetVisibleItem();
4597 item->GetSSL().security_style = web::SECURITY_STYLE_AUTHENTICATED;
estark 2016/11/29 21:28:48 I don't think you should be setting the security_s
lgarron 2016/12/02 01:21:52 Removed.
4598 item->GetSSL().content_status |= web::SSLStatus::DISPLAYED_INSECURE_CONTENT;
4599 item->GetSSL().content_status |=
4600 web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP;
estark 2016/11/29 21:28:48 Are you planning to later expand this method to ha
lgarron 2016/12/02 01:21:52 Possibly. I've renamed to didShowPasswordInputOnHT
4601 [self didUpdateSSLStatusForCurrentNavigationItem];
4602 }
4603
4593 - (void)handleSSLCertError:(NSError*)error { 4604 - (void)handleSSLCertError:(NSError*)error {
4594 CHECK(web::IsWKWebViewSSLCertError(error)); 4605 CHECK(web::IsWKWebViewSSLCertError(error));
4595 4606
4596 net::SSLInfo info; 4607 net::SSLInfo info;
4597 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info); 4608 web::GetSSLInfoFromWKWebViewSSLCertError(error, &info);
4598 4609
4599 if (!info.cert) { 4610 if (!info.cert) {
4600 // |info.cert| can be null if certChain in NSError is empty or can not be 4611 // |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 4612 // parsed, in this case do not ask delegate if error should be allowed, it
4602 // should not be. 4613 // should not be.
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
5768 } 5779 }
5769 5780
5770 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5781 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5771 } 5782 }
5772 5783
5773 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5784 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5774 return [action.request valueForHTTPHeaderField:@"Referer"]; 5785 return [action.request valueForHTTPHeaderField:@"Referer"];
5775 } 5786 }
5776 5787
5777 @end 5788 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698