summaryrefslogtreecommitdiff
path: root/chromium/sql
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-01 15:42:22 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-01 15:55:43 +0000
commit98a0061b881063a62c1941ccb67af6660ca89062 (patch)
tree5e77cc6ad4735e53db0d7a8766ed26ca726f9373 /chromium/sql
parent6c91641271e536ffaa88a1dff5127e42ee99a91e (diff)
downloadqtwebengine-chromium-98a0061b881063a62c1941ccb67af6660ca89062.tar.gz
BASELINE: Update Chromium to 49.0.2623.34
Change-Id: I89af6c0074347d4415cc1ce35a6d54a3760e6ad2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/sql')
-rw-r--r--chromium/sql/connection.cc10
-rw-r--r--chromium/sql/connection.h5
2 files changed, 13 insertions, 2 deletions
diff --git a/chromium/sql/connection.cc b/chromium/sql/connection.cc
index 003005a8e62..f08560c5135 100644
--- a/chromium/sql/connection.cc
+++ b/chromium/sql/connection.cc
@@ -43,6 +43,8 @@ namespace {
// TODO(shess): Better story on this. http://crbug.com/56559
const int kBusyTimeoutSeconds = 1;
+bool g_mmap_disabled_default = false;
+
class ScopedBusyTimeout {
public:
explicit ScopedBusyTimeout(sqlite3* db)
@@ -254,6 +256,12 @@ bool Connection::ShouldIgnoreSqliteCompileError(int error) {
basic_error == SQLITE_CORRUPT;
}
+// static
+void Connection::set_mmap_disabled_by_default() {
+ g_mmap_disabled_default = true;
+}
+
+
void Connection::ReportDiagnosticInfo(int extended_error, Statement* stmt) {
AssertIOAllowed();
@@ -339,7 +347,7 @@ Connection::Connection()
needs_rollback_(false),
in_memory_(false),
poisoned_(false),
- mmap_disabled_(false),
+ mmap_disabled_(g_mmap_disabled_default),
mmap_enabled_(false),
total_changes_at_last_release_(0),
stats_histogram_(NULL),
diff --git a/chromium/sql/connection.h b/chromium/sql/connection.h
index b35e2faaf32..4606a1f357c 100644
--- a/chromium/sql/connection.h
+++ b/chromium/sql/connection.h
@@ -149,9 +149,12 @@ class SQL_EXPORT Connection {
// other platforms.
void set_restrict_to_user() { restrict_to_user_ = true; }
- // Call to opt out of memory-mapped file I/O.
+ // Call to opt out of memory-mapped file I/O on per connection basis.
void set_mmap_disabled() { mmap_disabled_ = true; }
+ // Call to opt out of memory-mapped file I/O on all connections.
+ static void set_mmap_disabled_by_default();
+
// Set an error-handling callback. On errors, the error number (and
// statement, if available) will be passed to the callback.
//