| OLD | NEW |
| 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/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 .SetSummary(it.summary) | 50 .SetSummary(it.summary) |
| 51 .SetDescription(it.description) | 51 .SetDescription(it.description) |
| 52 .SetHasCertificate(it.has_certificate) | 52 .SetHasCertificate(it.has_certificate) |
| 53 .Build()); | 53 .Build()); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace | 57 } // namespace |
| 58 | 58 |
| 59 SecurityHandler::SecurityHandler() | 59 SecurityHandler::SecurityHandler() |
| 60 : enabled_(false), | 60 : DevToolsDomainHandler(Security::Metainfo::domainName), |
| 61 enabled_(false), |
| 61 host_(nullptr) { | 62 host_(nullptr) { |
| 62 } | 63 } |
| 63 | 64 |
| 64 SecurityHandler::~SecurityHandler() { | 65 SecurityHandler::~SecurityHandler() { |
| 65 } | 66 } |
| 66 | 67 |
| 67 void SecurityHandler::Wire(UberDispatcher* dispatcher) { | 68 void SecurityHandler::Wire(UberDispatcher* dispatcher) { |
| 68 frontend_.reset(new Security::Frontend(dispatcher->channel())); | 69 frontend_.reset(new Security::Frontend(dispatcher->channel())); |
| 69 Security::Dispatcher::wire(dispatcher, this); | 70 Security::Dispatcher::wire(dispatcher, this); |
| 70 } | 71 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate; | 158 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate; |
| 158 if (!certificate) | 159 if (!certificate) |
| 159 return Response::Error("Could not find certificate"); | 160 return Response::Error("Could not find certificate"); |
| 160 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( | 161 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 161 web_contents, certificate); | 162 web_contents, certificate); |
| 162 return Response::OK(); | 163 return Response::OK(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 } // namespace protocol | 166 } // namespace protocol |
| 166 } // namespace content | 167 } // namespace content |
| OLD | NEW |