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

Unified Diff: content/browser/ssl/ssl_manager.cc

Issue 2863623003: [DevTools] Support multiple sessions in content/ domain handlers (Closed)
Patch Set: Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698