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

Unified Diff: chrome/browser/history/history_database.cc

Issue 270101: Move the sqlite error handler to a single location... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_database.cc
===================================================================
--- chrome/browser/history/history_database.cc (revision 28907)
+++ chrome/browser/history/history_database.cc (working copy)
@@ -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 @@
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

Powered by Google App Engine
This is Rietveld 408576698