Chromium Code Reviews| Index: content/browser/ssl/ssl_manager.cc |
| diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc |
| index 2a3124acae247b38d959156da59540dc80a6a42e..76505c36f73d5a66be88c33e479aad5d4a46d53d 100644 |
| --- a/content/browser/ssl/ssl_manager.cc |
| +++ b/content/browser/ssl/ssl_manager.cc |
| @@ -383,17 +383,21 @@ void SSLManager::OnCertErrorInternal(std::unique_ptr<SSLErrorHandler> handler, |
| DevToolsAgentHostImpl* agent_host = static_cast<DevToolsAgentHostImpl*>( |
| DevToolsAgentHost::GetOrCreateFor(web_contents).get()); |
| - protocol::SecurityHandler* security_handler = |
| - protocol::SecurityHandler::FromAgentHost(agent_host); |
| - if (!security_handler || |
| - !security_handler->NotifyCertificateError( |
| - cert_error, request_url, |
| - base::Bind(&OnAllowCertificateWithRecordDecision, false, callback))) { |
| - GetContentClient()->browser()->AllowCertificateError( |
| - web_contents, cert_error, ssl_info, request_url, resource_type, |
| - overridable, strict_enforcement, expired_previous_decision, |
| - base::Bind(&OnAllowCertificateWithRecordDecision, true, callback)); |
| + if (agent_host) { |
| + for (auto* handler : protocol::SecurityHandler::ForAgentHost(agent_host)) { |
|
caseq
2017/05/05 18:27:24
Let's pick a different name so as not to shadow fu
dgozman
2017/05/05 20:29:42
Done.
|
| + if (handler->NotifyCertificateError( |
| + cert_error, request_url, |
| + base::Bind(&OnAllowCertificateWithRecordDecision, false, |
| + callback))) { |
| + return; |
| + } |
| + } |
| } |
| + |
| + GetContentClient()->browser()->AllowCertificateError( |
| + web_contents, cert_error, ssl_info, request_url, resource_type, |
| + overridable, strict_enforcement, expired_previous_decision, |
| + base::Bind(&OnAllowCertificateWithRecordDecision, true, callback)); |
| } |
| void SSLManager::UpdateEntry(NavigationEntryImpl* entry, |