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

Unified Diff: chrome/browser/history/thumbnail_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/thumbnail_database.cc
===================================================================
--- chrome/browser/history/thumbnail_database.cc (revision 28907)
+++ chrome/browser/history/thumbnail_database.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/file_util.h"
#include "base/time.h"
#include "base/string_util.h"
+#include "chrome/browser/diagnostics/sqlite_diagnostics.h"
#include "chrome/browser/history/history_publisher.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/common/thumbnail_score.h"
@@ -32,6 +33,9 @@
const HistoryPublisher* history_publisher) {
history_publisher_ = history_publisher;
+ // Set the exceptional sqlite error handler.
+ db_.set_error_delegate(GetErrorHandlerForThumbnailDb());
+
// Set the database page size to something 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