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/security_style_explanations.h" | 10 #include "content/public/browser/security_style_explanations.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ->set_displayed_insecure_content_style( | 117 ->set_displayed_insecure_content_style( |
118 SecurityStyleToProtocolSecurityState( | 118 SecurityStyleToProtocolSecurityState( |
119 security_style_explanations | 119 security_style_explanations |
120 .displayed_insecure_content_style)); | 120 .displayed_insecure_content_style)); |
121 | 121 |
122 client_->SecurityStateChanged( | 122 client_->SecurityStateChanged( |
123 SecurityStateChangedParams::Create() | 123 SecurityStateChangedParams::Create() |
124 ->set_security_state(security_state) | 124 ->set_security_state(security_state) |
125 ->set_scheme_is_cryptographic( | 125 ->set_scheme_is_cryptographic( |
126 security_style_explanations.scheme_is_cryptographic) | 126 security_style_explanations.scheme_is_cryptographic) |
| 127 ->set_pkp_bypassed(security_style_explanations.pkp_bypassed) |
127 ->set_mixed_content_status(mixed_content_status) | 128 ->set_mixed_content_status(mixed_content_status) |
128 ->set_explanations(explanations)); | 129 ->set_explanations(explanations)); |
129 } | 130 } |
130 | 131 |
131 Response SecurityHandler::Enable() { | 132 Response SecurityHandler::Enable() { |
132 enabled_ = true; | 133 enabled_ = true; |
133 if (host_) | 134 if (host_) |
134 AttachToRenderFrameHost(); | 135 AttachToRenderFrameHost(); |
135 | 136 |
136 return Response::OK(); | 137 return Response::OK(); |
137 } | 138 } |
138 | 139 |
139 Response SecurityHandler::Disable() { | 140 Response SecurityHandler::Disable() { |
140 enabled_ = false; | 141 enabled_ = false; |
141 WebContentsObserver::Observe(nullptr); | 142 WebContentsObserver::Observe(nullptr); |
142 return Response::OK(); | 143 return Response::OK(); |
143 } | 144 } |
144 | 145 |
145 } // namespace security | 146 } // namespace security |
146 } // namespace devtools | 147 } // namespace devtools |
147 } // namespace content | 148 } // namespace content |
OLD | NEW |