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

Side by Side Diff: content/browser/devtools/protocol/security_handler.cc

Issue 2296953004: Send certificates to devtools when it's open instead of using certId (Closed)
Patch Set: take out unneeded code 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/protocol/security_handler.h" 5 #include "content/browser/devtools/protocol/security_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "content/public/browser/security_style_explanations.h" 10 #include "content/public/browser/security_style_explanations.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 return Response::OK(); 141 return Response::OK();
142 } 142 }
143 143
144 Response SecurityHandler::Disable() { 144 Response SecurityHandler::Disable() {
145 enabled_ = false; 145 enabled_ = false;
146 WebContentsObserver::Observe(nullptr); 146 WebContentsObserver::Observe(nullptr);
147 return Response::OK(); 147 return Response::OK();
148 } 148 }
149 149
150 Response SecurityHandler::ShowCertificateViewer(int certificate_id) {
jam 2016/08/31 22:13:28 this is temporary since it's sent as part of the S
151 if (!host_)
152 return Response::InternalError("Could not connect to view");
153 WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
154 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
155 web_contents, certificate_id);
156 return Response::OK();
157 }
158
150 } // namespace security 159 } // namespace security
151 } // namespace devtools 160 } // namespace devtools
152 } // namespace content 161 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698