Do not register Chromium's HTML5 DB VFS as the default
[WebKit-https.git] / WebCore / platform / sql / chromium / SQLiteFileSystemChromium.cpp
index dc79fd027b452f98032bd80204da0ac98a23ab10..752c61312427c8def2c74863579e3cd7d5c9328a 100644 (file)
@@ -55,7 +55,8 @@ int SQLiteFileSystem::openDatabase(const String& fileName, sqlite3** database)
         return sqlite3_open16(path.charactersWithNullTermination(), database);
     }
 
-    // open databases using Chromium's VFS
+    // open databases using the default VFS
+    // in renderers, it should be Chromium's VFS; in the browser process it should be SQLite's default VFS
     return sqlite3_open_v2(fileName.utf8().data(), database,
                            SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX,
                            "chromium_vfs");
@@ -99,9 +100,7 @@ bool SQLiteFileSystem::deleteEmptyDatabaseDirectory(const String&)
 
 bool SQLiteFileSystem::deleteDatabaseFile(const String& fileName)
 {
-    // return true if and only if the error code returned by
-    // ChromiumBridge::deleteDatabase() is 0
-    return (!ChromiumBridge::databaseDeleteFile(fileName));
+    return (ChromiumBridge::databaseDeleteFile(fileName) == SQLITE_OK);
 }
 
 long long SQLiteFileSystem::getDatabaseFileSize(const String& fileName)