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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_database_impl.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_IMPL_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_IMPL_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_IMPL_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <queue> 10 #include <queue>
(...skipping 13 matching lines...) Expand all
24 // The reference implementation database using SQLite. 24 // The reference implementation database using SQLite.
25 class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase { 25 class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase {
26 public: 26 public:
27 SafeBrowsingDatabaseImpl(); 27 SafeBrowsingDatabaseImpl();
28 virtual ~SafeBrowsingDatabaseImpl(); 28 virtual ~SafeBrowsingDatabaseImpl();
29 29
30 // SafeBrowsingDatabase interface: 30 // SafeBrowsingDatabase interface:
31 31
32 // Initializes the database with the given filename. The callback is 32 // Initializes the database with the given filename. The callback is
33 // executed after finishing a chunk. 33 // executed after finishing a chunk.
34 virtual bool Init(const std::wstring& filename, 34 virtual bool Init(const FilePath& filename,
35 Callback0::Type* chunk_inserted_callback); 35 Callback0::Type* chunk_inserted_callback);
36 36
37 // Deletes the current database and creates a new one. 37 // Deletes the current database and creates a new one.
38 virtual bool ResetDatabase(); 38 virtual bool ResetDatabase();
39 39
40 // Returns false if the given url is not in the database. If it returns 40 // Returns false if the given url is not in the database. If it returns
41 // true, then either "list" is the name of the matching list, or prefix_hits 41 // true, then either "list" is the name of the matching list, or prefix_hits
42 // contains the matching hash prefixes. 42 // contains the matching hash prefixes.
43 virtual bool ContainsUrl(const GURL& url, 43 virtual bool ContainsUrl(const GURL& url,
44 std::string* matching_list, 44 std::string* matching_list,
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Used to schedule resuming from a lower power state. 253 // Used to schedule resuming from a lower power state.
254 ScopedRunnableMethodFactory<SafeBrowsingDatabaseImpl> resume_factory_; 254 ScopedRunnableMethodFactory<SafeBrowsingDatabaseImpl> resume_factory_;
255 255
256 // The amount of time, in milliseconds, to wait before the next disk write. 256 // The amount of time, in milliseconds, to wait before the next disk write.
257 int disk_delay_; 257 int disk_delay_;
258 258
259 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseImpl); 259 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseImpl);
260 }; 260 };
261 261
262 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_IMPL_H_ 262 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698