| 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/devtools/protocol/devtools_protocol_dispatcher.h" | 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 ->set_ran_insecure_content_style(SecurityStyleToProtocolSecurityState( | 123 ->set_ran_insecure_content_style(SecurityStyleToProtocolSecurityState( |
| 124 security_style_explanations.ran_insecure_content_style)) | 124 security_style_explanations.ran_insecure_content_style)) |
| 125 ->set_displayed_insecure_content_style( | 125 ->set_displayed_insecure_content_style( |
| 126 SecurityStyleToProtocolSecurityState( | 126 SecurityStyleToProtocolSecurityState( |
| 127 security_style_explanations | 127 security_style_explanations |
| 128 .displayed_insecure_content_style)); | 128 .displayed_insecure_content_style)); |
| 129 | 129 |
| 130 client_->SecurityStateChanged( | 130 client_->SecurityStateChanged( |
| 131 SecurityStateChangedParams::Create() | 131 SecurityStateChangedParams::Create() |
| 132 ->set_security_state(security_state) | 132 ->set_security_state(security_state) |
| 133 ->set_summary_override(security_style_explanations.summary_override) |
| 133 ->set_scheme_is_cryptographic( | 134 ->set_scheme_is_cryptographic( |
| 134 security_style_explanations.scheme_is_cryptographic) | 135 security_style_explanations.scheme_is_cryptographic) |
| 135 ->set_insecure_content_status(insecure_content_status) | 136 ->set_insecure_content_status(insecure_content_status) |
| 136 ->set_explanations(explanations)); | 137 ->set_explanations(explanations)); |
| 137 } | 138 } |
| 138 | 139 |
| 139 Response SecurityHandler::Enable() { | 140 Response SecurityHandler::Enable() { |
| 140 enabled_ = true; | 141 enabled_ = true; |
| 141 if (host_) | 142 if (host_) |
| 142 AttachToRenderFrameHost(); | 143 AttachToRenderFrameHost(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 159 if (!certificate) | 160 if (!certificate) |
| 160 return Response::InternalError("Could not find certificate"); | 161 return Response::InternalError("Could not find certificate"); |
| 161 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( | 162 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 162 web_contents, certificate); | 163 web_contents, certificate); |
| 163 return Response::OK(); | 164 return Response::OK(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 } // namespace security | 167 } // namespace security |
| 167 } // namespace devtools | 168 } // namespace devtools |
| 168 } // namespace content | 169 } // namespace content |
| OLD | NEW |