| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // This file should not be build on Android but is currently getting built. | 5 // This file should not be build on Android but is currently getting built. |
| 6 // TODO(vakh): Fix that: http://crbug.com/621647 | 6 // TODO(vakh): Fix that: http://crbug.com/621647 |
| 7 | 7 |
| 8 #include "components/safe_browsing_db/v4_local_database_manager.h" | 8 #include "components/safe_browsing_db/v4_local_database_manager.h" |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // value is 0, which represents the most severe list. | 80 // value is 0, which represents the most severe list. |
| 81 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { | 81 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { |
| 82 switch (list_id.threat_type()) { | 82 switch (list_id.threat_type()) { |
| 83 case MALWARE_THREAT: | 83 case MALWARE_THREAT: |
| 84 case SOCIAL_ENGINEERING_PUBLIC: | 84 case SOCIAL_ENGINEERING_PUBLIC: |
| 85 case MALICIOUS_BINARY: | 85 case MALICIOUS_BINARY: |
| 86 return 0; | 86 return 0; |
| 87 case UNWANTED_SOFTWARE: | 87 case UNWANTED_SOFTWARE: |
| 88 return 1; | 88 return 1; |
| 89 case API_ABUSE: | 89 case API_ABUSE: |
| 90 case CLIENT_INCIDENT: |
| 90 return 2; | 91 return 2; |
| 91 default: | 92 default: |
| 92 NOTREACHED() << "Unexpected ThreatType encountered: " | 93 NOTREACHED() << "Unexpected ThreatType encountered: " |
| 93 << list_id.threat_type(); | 94 << list_id.threat_type(); |
| 94 return kLeastSeverity; | 95 return kLeastSeverity; |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 | 98 |
| 98 } // namespace | 99 } // namespace |
| 99 | 100 |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 db_updated_callback_); | 730 db_updated_callback_); |
| 730 } | 731 } |
| 731 | 732 |
| 732 bool V4LocalDatabaseManager::AreStoresAvailableNow( | 733 bool V4LocalDatabaseManager::AreStoresAvailableNow( |
| 733 const StoresToCheck& stores_to_check) const { | 734 const StoresToCheck& stores_to_check) const { |
| 734 return enabled_ && v4_database_ && | 735 return enabled_ && v4_database_ && |
| 735 v4_database_->AreStoresAvailable(stores_to_check); | 736 v4_database_->AreStoresAvailable(stores_to_check); |
| 736 } | 737 } |
| 737 | 738 |
| 738 } // namespace safe_browsing | 739 } // namespace safe_browsing |
| OLD | NEW |