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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ~SafeBrowsingCheck(); | 65 ~SafeBrowsingCheck(); |
66 | 66 |
67 // Either |urls| or |full_hashes| is used to lookup database. |*_results| | 67 // Either |urls| or |full_hashes| is used to lookup database. |*_results| |
68 // are parallel vectors containing the results. They are initialized to | 68 // are parallel vectors containing the results. They are initialized to |
69 // contain SB_THREAT_TYPE_SAFE. | 69 // contain SB_THREAT_TYPE_SAFE. |
70 // |url_hit_hash| and |url_metadata| are parallel vectors containing full | 70 // |url_hit_hash| and |url_metadata| are parallel vectors containing full |
71 // hash and metadata of a database record provided the result. They are | 71 // hash and metadata of a database record provided the result. They are |
72 // initialized to be empty strings. | 72 // initialized to be empty strings. |
73 std::vector<GURL> urls; | 73 std::vector<GURL> urls; |
74 std::vector<SBThreatType> url_results; | 74 std::vector<SBThreatType> url_results; |
75 std::vector<std::string> url_metadata; | 75 std::vector<ThreatMetadata> url_metadata; |
76 std::vector<std::string> url_hit_hash; | 76 std::vector<std::string> url_hit_hash; |
77 std::vector<SBFullHash> full_hashes; | 77 std::vector<SBFullHash> full_hashes; |
78 std::vector<SBThreatType> full_hash_results; | 78 std::vector<SBThreatType> full_hash_results; |
79 | 79 |
80 SafeBrowsingDatabaseManager::Client* client; | 80 SafeBrowsingDatabaseManager::Client* client; |
81 bool is_extended_reporting; | 81 bool is_extended_reporting; |
82 bool need_get_hash; | 82 bool need_get_hash; |
83 base::TimeTicks start; // When check was sent to SB service. | 83 base::TimeTicks start; // When check was sent to SB service. |
84 ListType check_type; // See comment in constructor. | 84 ListType check_type; // See comment in constructor. |
85 std::vector<SBThreatType> expected_threats; | 85 std::vector<SBThreatType> expected_threats; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 // Timeout to use for safe browsing checks. | 378 // Timeout to use for safe browsing checks. |
379 base::TimeDelta check_timeout_; | 379 base::TimeDelta check_timeout_; |
380 | 380 |
381 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); | 381 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); |
382 }; // class LocalSafeBrowsingDatabaseManager | 382 }; // class LocalSafeBrowsingDatabaseManager |
383 | 383 |
384 } // namespace safe_browsing | 384 } // namespace safe_browsing |
385 | 385 |
386 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 386 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |