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

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

Issue 2639203003: Add certificate error handling to devtools. (Closed)
Patch Set: Add event parameters Created 3 years, 10 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 df2e7575b49da85f0455e6e880cc5e0f01d02318..28d28e2788b5ed15160f61559a1fcd6d44ea0cfe 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -356,11 +356,17 @@ void SSLManager::OnCertErrorInternal(std::unique_ptr<SSLErrorHandler> handler,
const net::SSLInfo& ssl_info = handler->ssl_info();
const GURL& request_url = handler->request_url();
ResourceType resource_type = handler->resource_type();
- GetContentClient()->browser()->AllowCertificateError(
- web_contents, cert_error, ssl_info, request_url, resource_type,
- overridable, strict_enforcement, expired_previous_decision,
+
+ base::Callback<void(content::CertificateRequestResultType)> callback =
base::Bind(&OnAllowCertificate, base::Owned(handler.release()),
- ssl_host_state_delegate_));
+ ssl_host_state_delegate_);
+
+ if (!web_contents->NotifyCertificateError(cert_error, request_url,
+ callback)) {
+ GetContentClient()->browser()->AllowCertificateError(
+ web_contents, cert_error, ssl_info, request_url, resource_type,
+ overridable, strict_enforcement, expired_previous_decision, callback);
+ }
}
void SSLManager::UpdateEntry(NavigationEntryImpl* entry,

Powered by Google App Engine
This is Rietveld 408576698