diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 00:56:41 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 00:56:41 +0000 |
commit | ed655b77ca7f838078b20ca030c8456818eafe70 (patch) | |
tree | 8d1e92706f0e556a4a280c2b9195a52f837fa678 /chrome/browser/history/history_database.cc | |
parent | 4a00221ac7fab87ea4da95af07f079c650694806 (diff) | |
download | chromium_src-ed655b77ca7f838078b20ca030c8456818eafe70.zip chromium_src-ed655b77ca7f838078b20ca030c8456818eafe70.tar.gz chromium_src-ed655b77ca7f838078b20ca030c8456818eafe70.tar.bz2 |
Move the sqlite error handler to a single location
- Eliminate code duplication
- Cover other 3 databases
- Still doing the same as before, sending UMA histograms
BUG=11908
TEST=none
Review URL: http://codereview.chromium.org/270101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_database.cc')
-rw-r--r-- | chrome/browser/history/history_database.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc index ee0b179..87367a4 100644 --- a/chrome/browser/history/history_database.cc +++ b/chrome/browser/history/history_database.cc @@ -13,6 +13,7 @@ #include "base/histogram.h" #include "base/rand_util.h" #include "base/string_util.h" +#include "chrome/browser/diagnostics/sqlite_diagnostics.h" namespace history { @@ -59,6 +60,9 @@ HistoryDatabase::~HistoryDatabase() { InitStatus HistoryDatabase::Init(const FilePath& history_name, const FilePath& bookmarks_path) { + // Set the exceptional sqlite error handler. + db_.set_error_delegate(GetErrorHandlerForHistoryDb()); + // Set the database page size to something a little larger to give us // better performance (we're typically seek rather than bandwidth limited). // This only has an effect before any tables have been created, otherwise |