| 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/security_state_tab_helper.h" | 5 #include "chrome/browser/ssl/security_state_tab_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return security_state::MALICIOUS_CONTENT_STATUS_MALWARE; | 172 return security_state::MALICIOUS_CONTENT_STATUS_MALWARE; |
| 173 break; | 173 break; |
| 174 case safe_browsing::SB_THREAT_TYPE_URL_UNWANTED: | 174 case safe_browsing::SB_THREAT_TYPE_URL_UNWANTED: |
| 175 return security_state::MALICIOUS_CONTENT_STATUS_UNWANTED_SOFTWARE; | 175 return security_state::MALICIOUS_CONTENT_STATUS_UNWANTED_SOFTWARE; |
| 176 break; | 176 break; |
| 177 case safe_browsing::SB_THREAT_TYPE_BINARY_MALWARE_URL: | 177 case safe_browsing::SB_THREAT_TYPE_BINARY_MALWARE_URL: |
| 178 case safe_browsing::SB_THREAT_TYPE_EXTENSION: | 178 case safe_browsing::SB_THREAT_TYPE_EXTENSION: |
| 179 case safe_browsing::SB_THREAT_TYPE_BLACKLISTED_RESOURCE: | 179 case safe_browsing::SB_THREAT_TYPE_BLACKLISTED_RESOURCE: |
| 180 case safe_browsing::SB_THREAT_TYPE_API_ABUSE: | 180 case safe_browsing::SB_THREAT_TYPE_API_ABUSE: |
| 181 case safe_browsing::SB_THREAT_TYPE_SUBRESOURCE_FILTER: | 181 case safe_browsing::SB_THREAT_TYPE_SUBRESOURCE_FILTER: |
| 182 case safe_browsing::SB_THREAT_TYPE_CSD_WHITELIST: |
| 182 // These threat types are not currently associated with | 183 // These threat types are not currently associated with |
| 183 // interstitials, and thus resources with these threat types are | 184 // interstitials, and thus resources with these threat types are |
| 184 // not ever whitelisted or pending whitelisting. | 185 // not ever whitelisted or pending whitelisting. |
| 185 NOTREACHED(); | 186 NOTREACHED(); |
| 186 break; | 187 break; |
| 187 } | 188 } |
| 188 } | 189 } |
| 189 return security_state::MALICIOUS_CONTENT_STATUS_NONE; | 190 return security_state::MALICIOUS_CONTENT_STATUS_NONE; |
| 190 } | 191 } |
| 191 | 192 |
| 192 std::unique_ptr<security_state::VisibleSecurityState> | 193 std::unique_ptr<security_state::VisibleSecurityState> |
| 193 SecurityStateTabHelper::GetVisibleSecurityState() const { | 194 SecurityStateTabHelper::GetVisibleSecurityState() const { |
| 194 auto state = security_state::GetVisibleSecurityState(web_contents()); | 195 auto state = security_state::GetVisibleSecurityState(web_contents()); |
| 195 | 196 |
| 196 // Malware status might already be known even if connection security | 197 // Malware status might already be known even if connection security |
| 197 // information is still being initialized, thus no need to check for that. | 198 // information is still being initialized, thus no need to check for that. |
| 198 state->malicious_content_status = GetMaliciousContentStatus(); | 199 state->malicious_content_status = GetMaliciousContentStatus(); |
| 199 | 200 |
| 200 return state; | 201 return state; |
| 201 } | 202 } |
| OLD | NEW |