diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 05:39:57 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 05:39:57 +0000 |
commit | 74cdedef60df3df4a2045e5ce542f142c0fd1e4b (patch) | |
tree | a348599c26a9a24a5e9d2da2b3cad9088bf8a881 /sql/connection.h | |
parent | dd809bbed0ac1499ba44500380984dd3eff72201 (diff) | |
download | chromium_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.h')
-rw-r--r-- | sql/connection.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/connection.h b/sql/connection.h index 7938606..5475a84 100644 --- a/sql/connection.h +++ b/sql/connection.h @@ -394,6 +394,12 @@ class SQL_EXPORT Connection { // SELECT type, name, tbl_name, sql FROM sqlite_master ORDER BY 1, 2, 3, 4; std::string GetSchema() const; + // Clients which provide an error_callback don't see the + // error-handling at the end of OnSqliteError(). Expose to allow + // those clients to work appropriately with ScopedErrorIgnorer in + // tests. + static bool ShouldIgnoreSqliteError(int error); + private: // For recovery module. friend class Recovery; @@ -436,7 +442,6 @@ class SQL_EXPORT Connection { // See test/scoped_error_ignorer.h. typedef base::Callback<bool(int)> ErrorIgnorerCallback; static ErrorIgnorerCallback* current_ignorer_cb_; - static bool ShouldIgnore(int error); static void SetErrorIgnorer(ErrorIgnorerCallback* ignorer); static void ResetErrorIgnorer(); |