OLD | NEW |
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 5071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5082 } | 5082 } |
5083 [self webPageChanged]; | 5083 [self webPageChanged]; |
5084 | 5084 |
5085 [self updateSSLStatusForCurrentNavigationItem]; | 5085 [self updateSSLStatusForCurrentNavigationItem]; |
5086 | 5086 |
5087 // Report cases where SSL cert is missing for a secure connection. | 5087 // Report cases where SSL cert is missing for a secure connection. |
5088 if (_documentURL.SchemeIsCryptographic()) { | 5088 if (_documentURL.SchemeIsCryptographic()) { |
5089 scoped_refptr<net::X509Certificate> cert = | 5089 scoped_refptr<net::X509Certificate> cert = |
5090 web::CreateCertFromChain([_webView certificateChain]); | 5090 web::CreateCertFromChain([_webView certificateChain]); |
5091 UMA_HISTOGRAM_BOOLEAN("WebController.WKWebViewHasCertForSecureConnection", | 5091 UMA_HISTOGRAM_BOOLEAN("WebController.WKWebViewHasCertForSecureConnection", |
5092 cert); | 5092 static_cast<bool>(cert)); |
5093 } | 5093 } |
5094 } | 5094 } |
5095 | 5095 |
5096 - (void)webView:(WKWebView*)webView | 5096 - (void)webView:(WKWebView*)webView |
5097 didFinishNavigation:(WKNavigation*)navigation { | 5097 didFinishNavigation:(WKNavigation*)navigation { |
5098 DCHECK(!_isHalted); | 5098 DCHECK(!_isHalted); |
5099 // Trigger JavaScript driven post-document-load-completion tasks. | 5099 // Trigger JavaScript driven post-document-load-completion tasks. |
5100 // TODO(crbug.com/546350): Investigate using | 5100 // TODO(crbug.com/546350): Investigate using |
5101 // WKUserScriptInjectionTimeAtDocumentEnd to inject this material at the | 5101 // WKUserScriptInjectionTimeAtDocumentEnd to inject this material at the |
5102 // appropriate time rather than invoking here. | 5102 // appropriate time rather than invoking here. |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5547 } | 5547 } |
5548 | 5548 |
5549 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5549 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
5550 } | 5550 } |
5551 | 5551 |
5552 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5552 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
5553 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5553 return [action.request valueForHTTPHeaderField:@"Referer"]; |
5554 } | 5554 } |
5555 | 5555 |
5556 @end | 5556 @end |
OLD | NEW |