| 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 "chrome/browser/ssl/chrome_security_state_model_client.h" | 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 return SecurityStateModel::NONE; | 65 return SecurityStateModel::NONE; |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Note: This is a lossy operation. Not all of the policies that can be | 68 // Note: This is a lossy operation. Not all of the policies that can be |
| 69 // expressed by a SecurityLevel (a //chrome concept) can be expressed by | 69 // expressed by a SecurityLevel (a //chrome concept) can be expressed by |
| 70 // a content::SecurityStyle. | 70 // a content::SecurityStyle. |
| 71 content::SecurityStyle SecurityLevelToSecurityStyle( | 71 content::SecurityStyle SecurityLevelToSecurityStyle( |
| 72 SecurityStateModel::SecurityLevel security_level) { | 72 SecurityStateModel::SecurityLevel security_level) { |
| 73 switch (security_level) { | 73 switch (security_level) { |
| 74 case SecurityStateModel::NONE: | 74 case SecurityStateModel::NONE: |
| 75 case SecurityStateModel::HTTP_SHOW_WARNING: |
| 75 return content::SECURITY_STYLE_UNAUTHENTICATED; | 76 return content::SECURITY_STYLE_UNAUTHENTICATED; |
| 76 case SecurityStateModel::SECURITY_WARNING: | 77 case SecurityStateModel::SECURITY_WARNING: |
| 77 case SecurityStateModel::SECURITY_POLICY_WARNING: | 78 case SecurityStateModel::SECURITY_POLICY_WARNING: |
| 78 return content::SECURITY_STYLE_WARNING; | 79 return content::SECURITY_STYLE_WARNING; |
| 79 case SecurityStateModel::EV_SECURE: | 80 case SecurityStateModel::EV_SECURE: |
| 80 case SecurityStateModel::SECURE: | 81 case SecurityStateModel::SECURE: |
| 81 return content::SECURITY_STYLE_AUTHENTICATED; | 82 return content::SECURITY_STYLE_AUTHENTICATED; |
| 82 case SecurityStateModel::SECURITY_ERROR: | 83 case SecurityStateModel::SECURITY_ERROR: |
| 83 return content::SECURITY_STYLE_AUTHENTICATION_BROKEN; | 84 return content::SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| 84 } | 85 } |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 state->ran_mixed_content = | 387 state->ran_mixed_content = |
| 387 !!(ssl.content_status & content::SSLStatus::RAN_INSECURE_CONTENT); | 388 !!(ssl.content_status & content::SSLStatus::RAN_INSECURE_CONTENT); |
| 388 state->displayed_content_with_cert_errors = | 389 state->displayed_content_with_cert_errors = |
| 389 !!(ssl.content_status & | 390 !!(ssl.content_status & |
| 390 content::SSLStatus::DISPLAYED_CONTENT_WITH_CERT_ERRORS); | 391 content::SSLStatus::DISPLAYED_CONTENT_WITH_CERT_ERRORS); |
| 391 state->ran_content_with_cert_errors = | 392 state->ran_content_with_cert_errors = |
| 392 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); | 393 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); |
| 393 | 394 |
| 394 CheckSafeBrowsingStatus(entry, web_contents_, state); | 395 CheckSafeBrowsingStatus(entry, web_contents_, state); |
| 395 } | 396 } |
| OLD | NEW |