| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 std::string SecurityStyleToProtocolSecurityState( | 25 std::string SecurityStyleToProtocolSecurityState( |
| 26 SecurityStyle security_style) { | 26 SecurityStyle security_style) { |
| 27 switch (security_style) { | 27 switch (security_style) { |
| 28 case SECURITY_STYLE_UNKNOWN: | 28 case SECURITY_STYLE_UNKNOWN: |
| 29 return kSecurityStateUnknown; | 29 return kSecurityStateUnknown; |
| 30 case SECURITY_STYLE_UNAUTHENTICATED: | 30 case SECURITY_STYLE_UNAUTHENTICATED: |
| 31 return kSecurityStateNeutral; | 31 return kSecurityStateNeutral; |
| 32 case SECURITY_STYLE_AUTHENTICATION_BROKEN: | 32 case SECURITY_STYLE_AUTHENTICATION_BROKEN: |
| 33 return kSecurityStateInsecure; | 33 return kSecurityStateInsecure; |
| 34 case SECURITY_STYLE_WARNING: | |
| 35 return kSecurityStateWarning; | |
| 36 case SECURITY_STYLE_AUTHENTICATED: | 34 case SECURITY_STYLE_AUTHENTICATED: |
| 37 return kSecurityStateSecure; | 35 return kSecurityStateSecure; |
| 38 default: | 36 default: |
| 39 NOTREACHED(); | 37 NOTREACHED(); |
| 40 return kSecurityStateUnknown; | 38 return kSecurityStateUnknown; |
| 41 } | 39 } |
| 42 } | 40 } |
| 43 | 41 |
| 44 void AddExplanations( | 42 void AddExplanations( |
| 45 const std::string& security_style, | 43 const std::string& security_style, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 scoped_refptr<net::X509Certificate> certificate = web_contents-> | 155 scoped_refptr<net::X509Certificate> certificate = web_contents-> |
| 158 GetController().GetLastCommittedEntry()->GetSSL().certificate; | 156 GetController().GetLastCommittedEntry()->GetSSL().certificate; |
| 159 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( | 157 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 160 web_contents, certificate); | 158 web_contents, certificate); |
| 161 return Response::OK(); | 159 return Response::OK(); |
| 162 } | 160 } |
| 163 | 161 |
| 164 } // namespace security | 162 } // namespace security |
| 165 } // namespace devtools | 163 } // namespace devtools |
| 166 } // namespace content | 164 } // namespace content |
| OLD | NEW |