Index: components/history/core/browser/history_database.cc |
diff --git a/components/history/core/browser/history_database.cc b/components/history/core/browser/history_database.cc |
index a11edafc1465c8d448e3b7ae7075bb98527fee2d..a3efe5632c440f415f51f1072f7adbd8ba7aed35 100644 |
--- a/components/history/core/browser/history_database.cc |
+++ b/components/history/core/browser/history_database.cc |
@@ -56,9 +56,6 @@ HistoryDatabase::~HistoryDatabase() { |
sql::InitStatus HistoryDatabase::Init(const base::FilePath& history_name) { |
db_.set_histogram_tag("History"); |
- // Set the exceptional sqlite error handler. |
- db_.set_error_callback(error_callback_); |
- |
// 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 |
@@ -259,7 +256,8 @@ void HistoryDatabase::CommitTransaction() { |
} |
void HistoryDatabase::RollbackTransaction() { |
- db_.RollbackTransaction(); |
+ if (db_.transaction_nesting()) |
sky
2016/08/02 13:27:21
Why are you doing this change now? Shouldn't this
afakhry
2016/08/02 23:58:24
Exactly. It is a DCHECK that I'm trying to avoid.
sky
2016/08/03 15:19:30
Got it. Please add a comment.
afakhry
2016/08/03 17:51:23
Done.
|
+ db_.RollbackTransaction(); |
} |
bool HistoryDatabase::RecreateAllTablesButURL() { |
@@ -296,6 +294,11 @@ bool HistoryDatabase::Raze() { |
return db_.Raze(); |
} |
+std::string HistoryDatabase::GetDiagnosticInfo(int extended_error, |
+ sql::Statement* statement) { |
+ return db_.GetDiagnosticInfo(extended_error, statement); |
+} |
+ |
bool HistoryDatabase::SetSegmentID(VisitID visit_id, SegmentID segment_id) { |
sql::Statement s(db_.GetCachedStatement(SQL_FROM_HERE, |
"UPDATE visits SET segment_id = ? WHERE id = ?")); |