| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
| 6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, | 227 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 228 CancelApiCheck); | 228 CancelApiCheck); |
| 229 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, | 229 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 230 ResultsAreCached); | 230 ResultsAreCached); |
| 231 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, | 231 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 232 ResultsAreNotCachedOnNull); | 232 ResultsAreNotCachedOnNull); |
| 233 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, | 233 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 234 GetCachedResults); | 234 GetCachedResults); |
| 235 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, | 235 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 236 CachedResultsMerged); | 236 CachedResultsMerged); |
| 237 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest, |
| 238 CachedResultsAreEvicted); |
| 237 | 239 |
| 238 typedef std::set<SafeBrowsingApiCheck*> ApiCheckSet; | 240 typedef std::set<SafeBrowsingApiCheck*> ApiCheckSet; |
| 239 typedef std::map<SBPrefix, SBCachedFullHashResult> PrefixToFullHashResultsMap; | 241 typedef std::map<SBPrefix, SBCachedFullHashResult> PrefixToFullHashResultsMap; |
| 240 typedef std::map<SBThreatType, PrefixToFullHashResultsMap> | 242 typedef std::map<SBThreatType, PrefixToFullHashResultsMap> |
| 241 ThreatTypeToResultsMap; | 243 ThreatTypeToResultsMap; |
| 242 | 244 |
| 243 // Called on the IO thread wheh the SafeBrowsingProtocolManager has received | 245 // Called on the IO thread wheh the SafeBrowsingProtocolManager has received |
| 244 // the full hash and api results for prefixes of the |url| argument in | 246 // the full hash and api results for prefixes of the |url| argument in |
| 245 // CheckApiBlacklistUrl. | 247 // CheckApiBlacklistUrl. |
| 246 virtual void HandleGetHashesWithApisResults( | 248 virtual void HandleGetHashesWithApisResults( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 276 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; | 278 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; |
| 277 | 279 |
| 278 private: | 280 private: |
| 279 // Returns an iterator to the pending API check with the given |client|. | 281 // Returns an iterator to the pending API check with the given |client|. |
| 280 ApiCheckSet::iterator FindClientApiCheck(Client* client); | 282 ApiCheckSet::iterator FindClientApiCheck(Client* client); |
| 281 }; // class SafeBrowsingDatabaseManager | 283 }; // class SafeBrowsingDatabaseManager |
| 282 | 284 |
| 283 } // namespace safe_browsing | 285 } // namespace safe_browsing |
| 284 | 286 |
| 285 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 287 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| OLD | NEW |