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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { | 86 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { |
87 switch (list_id.threat_type()) { | 87 switch (list_id.threat_type()) { |
88 case MALWARE_THREAT: | 88 case MALWARE_THREAT: |
89 case SOCIAL_ENGINEERING_PUBLIC: | 89 case SOCIAL_ENGINEERING_PUBLIC: |
90 case MALICIOUS_BINARY: | 90 case MALICIOUS_BINARY: |
91 return 0; | 91 return 0; |
92 case UNWANTED_SOFTWARE: | 92 case UNWANTED_SOFTWARE: |
93 return 1; | 93 return 1; |
94 case API_ABUSE: | 94 case API_ABUSE: |
95 case CLIENT_INCIDENT: | 95 case CLIENT_INCIDENT: |
| 96 case SUBRESOURCE_FILTER: |
96 return 2; | 97 return 2; |
97 default: | 98 default: |
98 NOTREACHED() << "Unexpected ThreatType encountered: " | 99 NOTREACHED() << "Unexpected ThreatType encountered: " |
99 << list_id.threat_type(); | 100 << list_id.threat_type(); |
100 return kLeastSeverity; | 101 return kLeastSeverity; |
101 } | 102 } |
102 } | 103 } |
103 | 104 |
104 } // namespace | 105 } // namespace |
105 | 106 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 db_updated_callback_); | 739 db_updated_callback_); |
739 } | 740 } |
740 | 741 |
741 bool V4LocalDatabaseManager::AreStoresAvailableNow( | 742 bool V4LocalDatabaseManager::AreStoresAvailableNow( |
742 const StoresToCheck& stores_to_check) const { | 743 const StoresToCheck& stores_to_check) const { |
743 return enabled_ && v4_database_ && | 744 return enabled_ && v4_database_ && |
744 v4_database_->AreStoresAvailable(stores_to_check); | 745 v4_database_->AreStoresAvailable(stores_to_check); |
745 } | 746 } |
746 | 747 |
747 } // namespace safe_browsing | 748 } // namespace safe_browsing |
OLD | NEW |