summaryrefslogtreecommitdiffstats
path: root/sql/connection.cc
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-25 05:39:57 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-25 05:39:57 +0000
commit74cdedef60df3df4a2045e5ce542f142c0fd1e4b (patch)
treea348599c26a9a24a5e9d2da2b3cad9088bf8a881 /sql/connection.cc
parentdd809bbed0ac1499ba44500380984dd3eff72201 (diff)
downloadchromium_src-74cdedef60df3df4a2045e5ce542f142c0fd1e4b.zip
chromium_src-74cdedef60df3df4a2045e5ce542f142c0fd1e4b.tar.gz
chromium_src-74cdedef60df3df4a2045e5ce542f142c0fd1e4b.tar.bz2
Recover corrupt Favicon databases.
Add sql::Recovery support to ThumbnailDatabase. Rearrange the schema setup to allow sharing with the recovery code. Unit test a few corruption cases. Add sql::Recovery::Rollback() to allow transitioning code to monitor failures for diagnostic purposes. It is possible/likely that that function can be removed if failure cases are infrequent enough (in which case it with Unrecoverable()). Expose sql::Connection::ShouldIgnore() to allow the error callback to support sql::ScopedErrorIgnorer for testing. BUG=240396 Review URL: https://chromiumcodereview.appspot.com/23533038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/connection.cc')
-rw-r--r--sql/connection.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/connection.cc b/sql/connection.cc
index 097edd7..0b49786 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -133,7 +133,7 @@ namespace sql {
Connection::ErrorIgnorerCallback* Connection::current_ignorer_cb_ = NULL;
// static
-bool Connection::ShouldIgnore(int error) {
+bool Connection::ShouldIgnoreSqliteError(int error) {
if (!current_ignorer_cb_)
return false;
return current_ignorer_cb_->Run(error);
@@ -1040,7 +1040,7 @@ int Connection::OnSqliteError(int err, sql::Statement *stmt) {
}
// The default handling is to assert on debug and to ignore on release.
- if (!ShouldIgnore(err))
+ if (!ShouldIgnoreSqliteError(err))
DLOG(FATAL) << GetErrorMessage();
return err;
}