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 // Safe Browsing Database Manager implementation that manages a local | 5 // Safe Browsing Database Manager implementation that manages a local |
6 // database. This is used by Desktop Chromium. | 6 // database. This is used by Desktop Chromium. |
7 | 7 |
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
10 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 typedef std::vector<SafeBrowsingCheck*> GetHashRequestors; | 168 typedef std::vector<SafeBrowsingCheck*> GetHashRequestors; |
169 typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests; | 169 typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests; |
170 | 170 |
171 // Clients that we've queued up for checking later once the database is ready. | 171 // Clients that we've queued up for checking later once the database is ready. |
172 struct QueuedCheck { | 172 struct QueuedCheck { |
173 QueuedCheck(const ListType check_type, | 173 QueuedCheck(const ListType check_type, |
174 Client* client, | 174 Client* client, |
175 const GURL& url, | 175 const GURL& url, |
176 const std::vector<SBThreatType>& expected_threats, | 176 const std::vector<SBThreatType>& expected_threats, |
177 const base::TimeTicks& start); | 177 const base::TimeTicks& start); |
| 178 QueuedCheck(const QueuedCheck& other); |
178 ~QueuedCheck(); | 179 ~QueuedCheck(); |
179 ListType check_type; | 180 ListType check_type; |
180 Client* client; | 181 Client* client; |
181 GURL url; | 182 GURL url; |
182 std::vector<SBThreatType> expected_threats; | 183 std::vector<SBThreatType> expected_threats; |
183 base::TimeTicks start; // When check was queued. | 184 base::TimeTicks start; // When check was queued. |
184 }; | 185 }; |
185 | 186 |
186 // Return the threat type of the severest entry in |full_hashes| which matches | 187 // Return the threat type of the severest entry in |full_hashes| which matches |
187 // |hash|, or SAFE if none match. | 188 // |hash|, or SAFE if none match. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 383 |
383 // Timeout to use for safe browsing checks. | 384 // Timeout to use for safe browsing checks. |
384 base::TimeDelta check_timeout_; | 385 base::TimeDelta check_timeout_; |
385 | 386 |
386 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); | 387 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); |
387 }; // class LocalSafeBrowsingDatabaseManager | 388 }; // class LocalSafeBrowsingDatabaseManager |
388 | 389 |
389 } // namespace safe_browsing | 390 } // namespace safe_browsing |
390 | 391 |
391 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 392 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |