| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // CheckApiBlacklistUrl. | 255 // CheckApiBlacklistUrl. |
| 256 void OnThreatMetadataResponse(std::unique_ptr<SafeBrowsingApiCheck> check, | 256 void OnThreatMetadataResponse(std::unique_ptr<SafeBrowsingApiCheck> check, |
| 257 const ThreatMetadata& md); | 257 const ThreatMetadata& md); |
| 258 | 258 |
| 259 typedef std::set<SafeBrowsingApiCheck*> ApiCheckSet; | 259 typedef std::set<SafeBrowsingApiCheck*> ApiCheckSet; |
| 260 | 260 |
| 261 // In-progress checks. This set owns the SafeBrowsingApiCheck pointers and is | 261 // In-progress checks. This set owns the SafeBrowsingApiCheck pointers and is |
| 262 // responsible for deleting them when removing from the set. | 262 // responsible for deleting them when removing from the set. |
| 263 ApiCheckSet api_checks_; | 263 ApiCheckSet api_checks_; |
| 264 | 264 |
| 265 // Whether the service is running. 'enabled_' is used by the |
| 266 // SafeBrowsingDatabaseManager on the IO thread during normal operations. |
| 267 bool enabled_; |
| 268 |
| 265 // Created and destroyed via StartOnIOThread/StopOnIOThread. | 269 // Created and destroyed via StartOnIOThread/StopOnIOThread. |
| 266 std::unique_ptr<V4GetHashProtocolManager> v4_get_hash_protocol_manager_; | 270 std::unique_ptr<V4GetHashProtocolManager> v4_get_hash_protocol_manager_; |
| 267 | 271 |
| 268 private: | 272 private: |
| 269 // Returns an iterator to the pending API check with the given |client|. | 273 // Returns an iterator to the pending API check with the given |client|. |
| 270 ApiCheckSet::iterator FindClientApiCheck(Client* client); | 274 ApiCheckSet::iterator FindClientApiCheck(Client* client); |
| 271 }; // class SafeBrowsingDatabaseManager | 275 }; // class SafeBrowsingDatabaseManager |
| 272 | 276 |
| 273 } // namespace safe_browsing | 277 } // namespace safe_browsing |
| 274 | 278 |
| 275 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 279 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| OLD | NEW |