Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_database_bloom.h

Issue 19610: Safe browsing cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <queue> 10 #include <queue>
(...skipping 14 matching lines...) Expand all
25 // The reference implementation database using SQLite. 25 // The reference implementation database using SQLite.
26 class SafeBrowsingDatabaseBloom : public SafeBrowsingDatabase { 26 class SafeBrowsingDatabaseBloom : public SafeBrowsingDatabase {
27 public: 27 public:
28 SafeBrowsingDatabaseBloom(); 28 SafeBrowsingDatabaseBloom();
29 virtual ~SafeBrowsingDatabaseBloom(); 29 virtual ~SafeBrowsingDatabaseBloom();
30 30
31 // SafeBrowsingDatabase interface: 31 // SafeBrowsingDatabase interface:
32 32
33 // Initializes the database with the given filename. The callback is 33 // Initializes the database with the given filename. The callback is
34 // executed after finishing a chunk. 34 // executed after finishing a chunk.
35 virtual bool Init(const std::wstring& filename, 35 virtual bool Init(const FilePath& filename,
36 Callback0::Type* chunk_inserted_callback); 36 Callback0::Type* chunk_inserted_callback);
37 37
38 // Deletes the current database and creates a new one. 38 // Deletes the current database and creates a new one.
39 virtual bool ResetDatabase(); 39 virtual bool ResetDatabase();
40 40
41 // Returns false if the given url is not in the database. If it returns 41 // Returns false if the given url is not in the database. If it returns
42 // true, then either "list" is the name of the matching list, or prefix_hits 42 // true, then either "list" is the name of the matching list, or prefix_hits
43 // contains the matching hash prefixes. 43 // contains the matching hash prefixes.
44 virtual bool ContainsUrl(const GURL& url, 44 virtual bool ContainsUrl(const GURL& url,
45 std::string* matching_list, 45 std::string* matching_list,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // Lock for protecting access to the bloom filter and hash cache. 248 // Lock for protecting access to the bloom filter and hash cache.
249 Lock lookup_lock_; 249 Lock lookup_lock_;
250 250
251 // A store for GetHash results that have not yet been written to the database. 251 // A store for GetHash results that have not yet been written to the database.
252 HashList pending_full_hashes_; 252 HashList pending_full_hashes_;
253 253
254 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseBloom); 254 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseBloom);
255 }; 255 };
256 256
257 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_ 257 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_BLOOM_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database_bloom.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698