Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: sql/connection.cc

Issue 2083543003: Updates SQL code now that mmap is supported on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sql/connection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index 5900e891f977c3ce9edbde044eacff4510263c64..40abc2988770342c117d7f8d58da3bb2e0cd05ac 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -36,6 +36,7 @@
#include "third_party/sqlite/sqlite3.h"
#if defined(OS_IOS) && defined(USE_SYSTEM_SQLITE)
+#include "base/ios/ios_util.h"
#include "third_party/sqlite/src/ext/icu/sqliteicu.h"
#endif
@@ -857,9 +858,11 @@ std::string Connection::CollectCorruptionInfo() {
size_t Connection::GetAppropriateMmapSize() {
AssertIOAllowed();
-#if defined(OS_IOS)
- // iOS SQLite does not support memory mapping.
- return 0;
+#if defined(OS_IOS) && defined(USE_SYSTEM_SQLITE)
+ if (!base::ios::IsRunningOnIOS10OrLater()) {
+ // iOS SQLite does not support memory mapping.
+ return 0;
+ }
#endif
// How much to map if no errors are found. 50MB encompasses the 99th
« no previous file with comments | « no previous file | sql/connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698