| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Implementation of the SafeBrowsingDatabaseManager that sends URLs | 5 // Implementation of the SafeBrowsingDatabaseManager that sends URLs |
| 6 // via IPC to a database that chromium doesn't manage locally. | 6 // via IPC to a database that chromium doesn't manage locally. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ |
| 9 #define COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 9 #define COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 bool CheckDownloadUrl(const std::vector<GURL>& url_chain, | 48 bool CheckDownloadUrl(const std::vector<GURL>& url_chain, |
| 49 Client* client) override; | 49 Client* client) override; |
| 50 bool CheckExtensionIDs(const std::set<std::string>& extension_ids, | 50 bool CheckExtensionIDs(const std::set<std::string>& extension_ids, |
| 51 Client* client) override; | 51 Client* client) override; |
| 52 bool MatchCsdWhitelistUrl(const GURL& url) override; | 52 bool MatchCsdWhitelistUrl(const GURL& url) override; |
| 53 bool MatchMalwareIP(const std::string& ip_address) override; | 53 bool MatchMalwareIP(const std::string& ip_address) override; |
| 54 bool MatchDownloadWhitelistUrl(const GURL& url) override; | 54 bool MatchDownloadWhitelistUrl(const GURL& url) override; |
| 55 bool MatchDownloadWhitelistString(const std::string& str) override; | 55 bool MatchDownloadWhitelistString(const std::string& str) override; |
| 56 bool MatchInclusionWhitelistUrl(const GURL& url) override; | 56 bool MatchInclusionWhitelistUrl(const GURL& url) override; |
| 57 bool MatchModuleWhitelistString(const std::string& str) override; | 57 bool MatchModuleWhitelistString(const std::string& str) override; |
| 58 bool CheckResourceUrl(const GURL& url, Client* client) override; |
| 58 bool IsMalwareKillSwitchOn() override; | 59 bool IsMalwareKillSwitchOn() override; |
| 59 bool IsCsdWhitelistKillSwitchOn() override; | 60 bool IsCsdWhitelistKillSwitchOn() override; |
| 60 | 61 |
| 61 // | 62 // |
| 62 // RemoteSafeBrowsingDatabaseManager implementation | 63 // RemoteSafeBrowsingDatabaseManager implementation |
| 63 // | 64 // |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 ~RemoteSafeBrowsingDatabaseManager() override; | 67 ~RemoteSafeBrowsingDatabaseManager() override; |
| 67 class ClientRequest; // Per-request tracker. | 68 class ClientRequest; // Per-request tracker. |
| 68 | 69 |
| 69 // Requests currently outstanding. This owns the ptrs. | 70 // Requests currently outstanding. This owns the ptrs. |
| 70 std::vector<ClientRequest*> current_requests_; | 71 std::vector<ClientRequest*> current_requests_; |
| 71 bool enabled_; | 72 bool enabled_; |
| 72 | 73 |
| 73 std::set<content::ResourceType> resource_types_to_check_; | 74 std::set<content::ResourceType> resource_types_to_check_; |
| 74 | 75 |
| 75 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; | 76 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; |
| 76 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); | 77 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); |
| 77 }; // class RemoteSafeBrowsingDatabaseManager | 78 }; // class RemoteSafeBrowsingDatabaseManager |
| 78 | 79 |
| 79 } // namespace safe_browsing | 80 } // namespace safe_browsing |
| 80 | 81 |
| 81 #endif // COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 82 #endif // COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ |
| OLD | NEW |