| 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 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| 7 | 7 |
| 8 // A class that implements the stateless methods used by the GetHashUpdate and | 8 // A class that implements the stateless methods used by the GetHashUpdate and |
| 9 // GetFullHash stubby calls made by Chrome using the SafeBrowsing V4 protocol. | 9 // GetFullHash stubby calls made by Chrome using the SafeBrowsing V4 protocol. |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 ThreatEntryType threat_entry_type_; | 124 ThreatEntryType threat_entry_type_; |
| 125 ThreatType threat_type_; | 125 ThreatType threat_type_; |
| 126 | 126 |
| 127 ListIdentifier(); | 127 ListIdentifier(); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 std::ostream& operator<<(std::ostream& os, const ListIdentifier& id); | 130 std::ostream& operator<<(std::ostream& os, const ListIdentifier& id); |
| 131 | 131 |
| 132 PlatformType GetCurrentPlatformType(); | 132 PlatformType GetCurrentPlatformType(); |
| 133 const ListIdentifier GetChromeUrlApiId(); | 133 const ListIdentifier GetChromeUrlApiId(); |
| 134 const ListIdentifier GetChromeUrlClientIncidentId(); |
| 134 const ListIdentifier GetUrlMalwareId(); | 135 const ListIdentifier GetUrlMalwareId(); |
| 135 const ListIdentifier GetUrlMalBinId(); | 136 const ListIdentifier GetUrlMalBinId(); |
| 136 const ListIdentifier GetUrlSocEngId(); | 137 const ListIdentifier GetUrlSocEngId(); |
| 137 const ListIdentifier GetUrlUwsId(); | 138 const ListIdentifier GetUrlUwsId(); |
| 138 | 139 |
| 139 // Represents the state of each store. | 140 // Represents the state of each store. |
| 140 typedef base::hash_map<ListIdentifier, std::string> StoreStateMap; | 141 typedef base::hash_map<ListIdentifier, std::string> StoreStateMap; |
| 141 | 142 |
| 142 // Sever response, parsed in vector form. | 143 // Sever response, parsed in vector form. |
| 143 typedef std::vector<std::unique_ptr<ListUpdateResponse>> ParsedServerResponse; | 144 typedef std::vector<std::unique_ptr<ListUpdateResponse>> ParsedServerResponse; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 328 |
| 328 template <> | 329 template <> |
| 329 struct hash<safe_browsing::ListIdentifier> { | 330 struct hash<safe_browsing::ListIdentifier> { |
| 330 std::size_t operator()(const safe_browsing::ListIdentifier& id) const { | 331 std::size_t operator()(const safe_browsing::ListIdentifier& id) const { |
| 331 return id.hash(); | 332 return id.hash(); |
| 332 } | 333 } |
| 333 }; | 334 }; |
| 334 } | 335 } |
| 335 | 336 |
| 336 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 337 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| OLD | NEW |