[Webkit-unassigned] [Bug 26940] [Chromium] Add a SQLite VFS for Chromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 6 12:41:26 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26940


Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32206|review?                     |review-
               Flag|                            |




--- Comment #4 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2009-07-06 12:41:25 PDT ---
(From update of attachment 32206)
> Index: WebCore/platform/sql/chromium/SQLiteFileSystemChromium.cpp

If this is a Windows-specific file, it should be
SQLiteFileSystemChromiumWin.cpp

> +        if (desiredFlags & SQLITE_OPEN_READWRITE) {
> +            int newFlags = (desiredFlags | SQLITE_OPEN_READONLY) & ~SQLITE_OPEN_READWRITE;
> +            return chromiumOpen(0, fileName, id, newFlags, usedFlags);
> +        } else {
> +            return SQLITE_CANTOPEN;
> +	}

Fix indentation, no need for brackets for one-liners.

> +#ifndef SQLITE_OMIT_LOAD_EXTENSION
> +// Returns NULL, thus disallowing loading libraries in the renderer process.
> +//
> +// vfs - pointer to the sqlite3_vfs object.
> +// fileName - the name of the shared library file.
> +void* chromiumDlOpen(sqlite3_vfs* vfs, const char* fileName)
> +{
> +    return NULL;

return 0;

> +    static sqlite3_vfs chromium_vfs = {
> +      1,
> +      win32_vfs->szOsFile,
> +      win32_vfs->mxPathname,
> +      0,
> +      "chromium_vfs",
> +      0,
> +      chromiumOpen,
> +      chromiumDelete,
> +      chromiumAccess,
> +      chromiumFullPathname,
> +      chromiumDlOpen,
> +      win32_vfs->xDlError,
> +      win32_vfs->xDlSym,
> +      win32_vfs->xDlClose,
> +      win32_vfs->xRandomness,
> +      win32_vfs->xSleep,
> +      win32_vfs->xCurrentTime,
> +      win32_vfs->xGetLastError

4 space indent.

> +
> +bool SQLiteFileSystem::ensureDatabaseDirectoryExists(const String& path)
> +{

Should probably eliminate unused param for consistency.

> +bool SQLiteFileSystem::ensureDatabaseFileExists(const String& fileName, bool checkPathOnly)
> +{

Ditto.

> +bool SQLiteFileSystem::deleteEmptyDatabaseDirectory(const String& path)
> +{

Ditto.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list