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

Unified Diff: content/browser/devtools/protocol/security_handler.cc

Issue 2344113003: Fix DevTools showCertificateViewer to use visible entry (Closed)
Patch Set: load test certs in SetUpOnMainThread Created 4 years, 3 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/protocol/devtools_protocol_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/security_handler.cc
diff --git a/content/browser/devtools/protocol/security_handler.cc b/content/browser/devtools/protocol/security_handler.cc
index f3ff1405037807ebee3a516939dd5fa40abbf1bc..1b92427c9b3042c8dec2b3c52a14bebf7d600fd0 100644
--- a/content/browser/devtools/protocol/security_handler.cc
+++ b/content/browser/devtools/protocol/security_handler.cc
@@ -154,8 +154,8 @@ Response SecurityHandler::ShowCertificateViewer() {
if (!host_)
return Response::InternalError("Could not connect to view");
WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
- scoped_refptr<net::X509Certificate> certificate = web_contents->
- GetController().GetLastCommittedEntry()->GetSSL().certificate;
+ scoped_refptr<net::X509Certificate> certificate =
+ web_contents->GetController().GetVisibleEntry()->GetSSL().certificate;
if (!certificate)
return Response::InternalError("Could not find certificate");
web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
« no previous file with comments | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698