| 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 4376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4387 // Ask web client if this cert error should be allowed. | 4387 // Ask web client if this cert error should be allowed. |
| 4388 web::GetWebClient()->AllowCertificateError( | 4388 web::GetWebClient()->AllowCertificateError( |
| 4389 self.webState, net::MapCertStatusToNetError(info.cert_status), info, | 4389 self.webState, net::MapCertStatusToNetError(info.cert_status), info, |
| 4390 net::GURLWithNSURL(requestURL), recoverable, | 4390 net::GURLWithNSURL(requestURL), recoverable, |
| 4391 base::BindBlock(^(bool proceed) { | 4391 base::BindBlock(^(bool proceed) { |
| 4392 if (proceed) { | 4392 if (proceed) { |
| 4393 DCHECK(recoverable); | 4393 DCHECK(recoverable); |
| 4394 [_certVerificationController allowCert:leafCert | 4394 [_certVerificationController allowCert:leafCert |
| 4395 forHost:host | 4395 forHost:host |
| 4396 status:info.cert_status]; | 4396 status:info.cert_status]; |
| 4397 [self.sessionController.sessionCertificatePolicyManager |
| 4398 registerAllowedCertificate:leafCert |
| 4399 forHost:base::SysNSStringToUTF8(host) |
| 4400 status:info.cert_status]; |
| 4397 [self loadCurrentURL]; | 4401 [self loadCurrentURL]; |
| 4398 } | 4402 } |
| 4399 })); | 4403 })); |
| 4400 | 4404 |
| 4401 [self didUpdateSSLStatusForCurrentNavigationItem]; | 4405 [self didUpdateSSLStatusForCurrentNavigationItem]; |
| 4402 [self loadCancelled]; | 4406 [self loadCancelled]; |
| 4403 } | 4407 } |
| 4404 | 4408 |
| 4405 - (void)ensureWebViewCreated { | 4409 - (void)ensureWebViewCreated { |
| 4406 WKWebViewConfiguration* config = | 4410 WKWebViewConfiguration* config = |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5528 } | 5532 } |
| 5529 | 5533 |
| 5530 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5534 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
| 5531 } | 5535 } |
| 5532 | 5536 |
| 5533 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5537 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
| 5534 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5538 return [action.request valueForHTTPHeaderField:@"Referer"]; |
| 5535 } | 5539 } |
| 5536 | 5540 |
| 5537 @end | 5541 @end |
| OLD | NEW |