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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // sure we are conservative we will return true if an error occurs. This | 111 // sure we are conservative we will return true if an error occurs. This |
112 // method must be called on the IO thread. | 112 // method must be called on the IO thread. |
113 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0; | 113 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0; |
114 | 114 |
115 // Check if the |url| matches any of the full-length hashes from the off- | 115 // Check if the |url| matches any of the full-length hashes from the off- |
116 // domain inclusion whitelist. Returns true if there was a match and false | 116 // domain inclusion whitelist. Returns true if there was a match and false |
117 // otherwise. To make sure we are conservative, we will return true if an | 117 // otherwise. To make sure we are conservative, we will return true if an |
118 // error occurs. This method must be called on the IO thread. | 118 // error occurs. This method must be called on the IO thread. |
119 virtual bool MatchInclusionWhitelistUrl(const GURL& url) = 0; | 119 virtual bool MatchInclusionWhitelistUrl(const GURL& url) = 0; |
120 | 120 |
| 121 // Check if |str|, a lowercase DLL file name, matches any of the full-length |
| 122 // hashes from the module whitelist. Returns true if there was a match and |
| 123 // false otherwise. To make sure we are conservative we will return true if |
| 124 // an error occurs. This method must be called on the IO thread. |
| 125 virtual bool MatchModuleWhitelistString(const std::string& str) = 0; |
| 126 |
121 // Check if the CSD malware IP matching kill switch is turned on. | 127 // Check if the CSD malware IP matching kill switch is turned on. |
122 virtual bool IsMalwareKillSwitchOn() = 0; | 128 virtual bool IsMalwareKillSwitchOn() = 0; |
123 | 129 |
124 // Check if the CSD whitelist kill switch is turned on. | 130 // Check if the CSD whitelist kill switch is turned on. |
125 virtual bool IsCsdWhitelistKillSwitchOn() = 0; | 131 virtual bool IsCsdWhitelistKillSwitchOn() = 0; |
126 | 132 |
127 // Called on the IO thread to cancel a pending check if the result is no | 133 // Called on the IO thread to cancel a pending check if the result is no |
128 // longer needed. Also called after the result has been handled. | 134 // longer needed. Also called after the result has been handled. |
129 virtual void CancelCheck(Client* client) = 0; | 135 virtual void CancelCheck(Client* client) = 0; |
130 | 136 |
(...skipping 16 matching lines...) Expand all Loading... |
147 | 153 |
148 protected: | 154 protected: |
149 virtual ~SafeBrowsingDatabaseManager() {} | 155 virtual ~SafeBrowsingDatabaseManager() {} |
150 | 156 |
151 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; | 157 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; |
152 }; // class SafeBrowsingDatabaseManager | 158 }; // class SafeBrowsingDatabaseManager |
153 | 159 |
154 } // namespace safe_browsing | 160 } // namespace safe_browsing |
155 | 161 |
156 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 162 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
OLD | NEW |