summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_database.h
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 21:43:37 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 21:43:37 +0000
commit93e6efa3d7634b1500f1d9b1e32c370047151227 (patch)
tree9b1bf6a84993e221b0a8a350e197805585b71eef /chrome/browser/safe_browsing/safe_browsing_database.h
parentf294da7127cd4c278aa1f172e94d382250e92e4e (diff)
downloadchromium_src-93e6efa3d7634b1500f1d9b1e32c370047151227.zip
chromium_src-93e6efa3d7634b1500f1d9b1e32c370047151227.tar.gz
chromium_src-93e6efa3d7634b1500f1d9b1e32c370047151227.tar.bz2
Fixed data race between GetDatabase and CheckURL at startup.
Also did a bit of code cleanup. BUG=11106 TEST=use tsan on ViewSourceTest.DoesBrowserRenderInViewSource Review URL: http://codereview.chromium.org/273020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_database.h')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index a2575eb..dd0d49c4 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -36,7 +36,7 @@ class SafeBrowsingDatabase {
// Initializes the database with the given filename. The callback is
// executed after finishing a chunk.
- virtual bool Init(const FilePath& filename,
+ virtual void Init(const FilePath& filename,
Callback0::Type* chunk_inserted_callback) = 0;
// Deletes the current database and creates a new one.
@@ -84,8 +84,9 @@ class SafeBrowsingDatabase {
// Called when the user's machine has resumed from a lower power state.
virtual void HandleResume() = 0;
- virtual bool UpdateStarted() { return true; }
- virtual void UpdateFinished(bool update_succeeded) {}
+ // Returns true if we have successfully started the update transaction.
+ virtual bool UpdateStarted() = 0;
+ virtual void UpdateFinished(bool update_succeeded) = 0;
virtual FilePath filename() const { return filename_; }