[sql] Don't persist data in journal files.

Using journal_mode=PERSIST in combination with secure_delete=ON is
probably not quite right.  Switch to journal_mode=TRUNCATE for now,
while considering whether that combination should overwrite (or be
forbidden).

BUG=493008

Review URL: https://codereview.chromium.org/1159033004

Cr-Commit-Position: refs/heads/master@{#332309}
diff --git a/sql/connection.cc b/sql/connection.cc
index b91234b..8720985 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -988,12 +988,10 @@
   // DELETE (default) - delete -journal file to commit.
   // TRUNCATE - truncate -journal file to commit.
   // PERSIST - zero out header of -journal file to commit.
-  // journal_size_limit provides size to trim to in PERSIST.
-  // TODO(shess): Figure out if PERSIST and journal_size_limit really
-  // matter.  In theory, it keeps pages pre-allocated, so if
-  // transactions usually fit, it should be faster.
-  ignore_result(Execute("PRAGMA journal_mode = PERSIST"));
-  ignore_result(Execute("PRAGMA journal_size_limit = 16384"));
+  // TRUNCATE should be faster than DELETE because it won't need directory
+  // changes for each transaction.  PERSIST may break the spirit of using
+  // secure_delete.
+  ignore_result(Execute("PRAGMA journal_mode = TRUNCATE"));
 
   const base::TimeDelta kBusyTimeout =
     base::TimeDelta::FromSeconds(kBusyTimeoutSeconds);