diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 23:23:58 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 23:23:58 +0000 |
commit | 6e0b144409ce2faf01a30fad5f12cae0f6a89485 (patch) | |
tree | fd55be8761357f786ba242ce0d671fa91bf26739 /sql | |
parent | 2bbd2c670008e30aaaef6c3c25ae37e0c17f8c3f (diff) | |
download | chromium_src-6e0b144409ce2faf01a30fad5f12cae0f6a89485.zip chromium_src-6e0b144409ce2faf01a30fad5f12cae0f6a89485.tar.gz chromium_src-6e0b144409ce2faf01a30fad5f12cae0f6a89485.tar.bz2 |
Enable SQLite's secure-delete at runtime so that
we don't need to rely on system SQLite being compiled
with specific flags.
BUG=22208
Review URL: http://codereview.chromium.org/7552022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql')
-rw-r--r-- | sql/connection.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/connection.cc b/sql/connection.cc index 3f63301..0f2df97 100644 --- a/sql/connection.cc +++ b/sql/connection.cc @@ -376,6 +376,12 @@ bool Connection::OpenInternal(const std::string& file_name) { NOTREACHED() << "Could not set cache size: " << GetErrorMessage(); } + if (!ExecuteWithTimeout("PRAGMA secure_delete=ON", kBusyTimeout)) { + NOTREACHED() << "Could not enable secure_delete: " << GetErrorMessage(); + Close(); + return false; + } + return true; } |