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

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

Issue 2863623003: [DevTools] Support multiple sessions in content/ domain handlers (Closed)
Patch Set: addressed review comments 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
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a4b1b910fa00ff53b33e4a96986804608b44ad7d 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -383,17 +383,22 @@ 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* security_handler :
+ protocol::SecurityHandler::ForAgentHost(agent_host)) {
+ if (security_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,
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698