Fix Chromium's HTML5 DB support in --single-process mode.
https://bugs.webkit.org/show_bug.cgi?id=37186.

Reviewed by Jeremy Orlow.

Always register and use Chromium's SQLite VFS for
WebSQLDatabases. Keep using the default VFS in all other
cases. This change should allow Chromium to support
WebSQLDatabases in --single-process mode.

Also, cleaning up a bit SQLiteFileSystemChromium and getting rid
of the SQLITE_OPEN_FULLMUTEX flag: we use sqlite DB handles only
on the DB thread, so we don't need multi-threaded support.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open):
* platform/sql/SQLiteDatabase.h:
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/SQLiteFileSystem.h:
* platform/sql/chromium/SQLiteFileSystemChromium.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
(WebCore::SQLiteFileSystem::registerSQLiteVFS):
* platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
(WebCore::SQLiteFileSystem::registerSQLiteVFS):
* storage/Database.cpp:
(WebCore::Database::performOpenAndVerify):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/platform/sql/SQLiteFileSystem.h b/WebCore/platform/sql/SQLiteFileSystem.h
index 0a26e9d..f25d01d 100644
--- a/WebCore/platform/sql/SQLiteFileSystem.h
+++ b/WebCore/platform/sql/SQLiteFileSystem.h
@@ -52,7 +52,10 @@
     // fileName - The name of the database file.
     // database - The SQLite structure that represents the database stored
     //            in the given file.
-    static int openDatabase(const String& fileName, sqlite3** database);
+    // forWebSQLDatabase - True, if and only if we're opening a Web SQL Database file.
+    //                     Used by Chromium to determine if the DB file needs to be opened
+    //                     using a custom VFS.
+    static int openDatabase(const String& fileName, sqlite3** database, bool forWebSQLDatabase);
 
     // Returns the file name for a database.
     //