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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const SecurityStyleExplanations& security_style_explanations) { | 92 const SecurityStyleExplanations& security_style_explanations) { |
93 DCHECK(enabled_); | 93 DCHECK(enabled_); |
94 | 94 |
95 const std::string security_state = | 95 const std::string security_state = |
96 SecurityStyleToProtocolSecurityState(security_style); | 96 SecurityStyleToProtocolSecurityState(security_style); |
97 | 97 |
98 std::vector<scoped_refptr<SecurityStateExplanation>> explanations; | 98 std::vector<scoped_refptr<SecurityStateExplanation>> explanations; |
99 AddExplanations(kSecurityStateInsecure, | 99 AddExplanations(kSecurityStateInsecure, |
100 security_style_explanations.broken_explanations, | 100 security_style_explanations.broken_explanations, |
101 &explanations); | 101 &explanations); |
102 AddExplanations(kSecurityStateWarning, | 102 AddExplanations(kSecurityStateNeutral, |
103 security_style_explanations.warning_explanations, | 103 security_style_explanations.unauthenticated_explanations, |
104 &explanations); | 104 &explanations); |
105 AddExplanations(kSecurityStateSecure, | 105 AddExplanations(kSecurityStateSecure, |
106 security_style_explanations.secure_explanations, | 106 security_style_explanations.secure_explanations, |
107 &explanations); | 107 &explanations); |
108 | 108 |
109 scoped_refptr<MixedContentStatus> mixed_content_status = | 109 scoped_refptr<MixedContentStatus> mixed_content_status = |
110 MixedContentStatus::Create() | 110 MixedContentStatus::Create() |
111 ->set_ran_insecure_content( | 111 ->set_ran_insecure_content( |
112 security_style_explanations.ran_insecure_content) | 112 security_style_explanations.ran_insecure_content) |
113 ->set_displayed_insecure_content( | 113 ->set_displayed_insecure_content( |
(...skipping 24 matching lines...) Expand all Loading... |
138 | 138 |
139 Response SecurityHandler::Disable() { | 139 Response SecurityHandler::Disable() { |
140 enabled_ = false; | 140 enabled_ = false; |
141 WebContentsObserver::Observe(nullptr); | 141 WebContentsObserver::Observe(nullptr); |
142 return Response::OK(); | 142 return Response::OK(); |
143 } | 143 } |
144 | 144 |
145 } // namespace security | 145 } // namespace security |
146 } // namespace devtools | 146 } // namespace devtools |
147 } // namespace content | 147 } // namespace content |
OLD | NEW |