From eca56d34420e0f72a472c928714d1fcc7ced24ea Mon Sep 17 00:00:00 2001 From: "dumi@chromium.org" Date: Mon, 20 Jul 2009 18:04:04 +0000 Subject: Stubs for DB-related methods in ChromiumBridge. Review URL: http://codereview.chromium.org/159044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21083 0039d316-1c4b-4281-b951-d872f2087c98 --- DEPS | 2 +- third_party/sqlite/README.chromium | 5 ++++- third_party/sqlite/src/os_win.c | 7 +++++++ webkit/api/src/ChromiumBridge.cpp | 33 +++++++++++++++++++++++++++++++++ webkit/webkit.gyp | 3 +++ 5 files changed, 48 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2f25343..6dce277 100644 --- a/DEPS +++ b/DEPS @@ -1,7 +1,7 @@ vars = { "webkit_trunk": "http://svn.webkit.org/repository/webkit/trunk", - "webkit_revision": "46125", + "webkit_revision": "46126", } diff --git a/third_party/sqlite/README.chromium b/third_party/sqlite/README.chromium index 509f313..b44671a 100644 --- a/third_party/sqlite/README.chromium +++ b/third_party/sqlite/README.chromium @@ -68,7 +68,7 @@ Scott Hess , December 11, 2007 -------------------------------------------- -As of September 12, 2008, these are our changes from sqlite_vendor: +As of July 17, 2009, these are our changes from sqlite_vendor: - fts2.c disables fts2_tokenizer(). - sqlite3Poison() in src/btree.c. @@ -103,3 +103,6 @@ Changes from Chrome: allows much faster performance by reading the file in one contiguous operation rather than bringing it in organically, which involves a lot of seeking. + - Added a new function chromium_sqlite3_initialize_win_sqlite3_file() + at the end of os_win.c. It allows the Windows-specific Chromium VFS + to reuse most of the win32 SQLite VFS. diff --git a/third_party/sqlite/src/os_win.c b/third_party/sqlite/src/os_win.c index ec30add..f5baabb 100644 --- a/third_party/sqlite/src/os_win.c +++ b/third_party/sqlite/src/os_win.c @@ -1635,4 +1635,11 @@ int sqlite3_os_end(void){ return SQLITE_OK; } +void chromium_sqlite3_initialize_win_sqlite3_file(sqlite3_file* file, HANDLE handle) { + winFile* winSQLite3File = (winFile*)file; + memset(file, 0, sizeof(*file)); + winSQLite3File->pMethod = &winIoMethod; + winSQLite3File->h = handle; +} + #endif /* SQLITE_OS_WIN */ diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index 4d05a2e..f8d2e99 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -420,4 +420,37 @@ bool ChromiumBridge::isLinkVisited(WebCore::LinkHash visitedLinkHash) return webKitClient()->isLinkVisited(visitedLinkHash); } +// HTML5 DB ------------------------------------------------------------------- + +#if ENABLE(DATABASE) +PlatformFileHandle ChromiumBridge::databaseOpenFile(const String& fileName, + int desiredFlags) +{ + // FIXME: un-stub when the code on the browser process side is submitted + //return webKitClient()->databaseOpenFile(WebString(fileName), desiredFlags); + return invalidPlatformFileHandle; +} + +bool ChromiumBridge::databaseDeleteFile(const String& fileName) +{ + // FIXME: un-stub when the code on the browser process side is submitted + //return webKitClient()->databaseDeleteFile(WebString(fileName)); + return false; +} + +long ChromiumBridge::databaseGetFileAttributes(const String& fileName) +{ + // FIXME: un-stub when the code on the browser process side is submitted + //return webKitClient()->databaseGetFileAttributes(WebString(fileName)); + return 0L; +} + +long long ChromiumBridge::databaseGetFileSize(const String& fileName) +{ + // FIXME: un-stub when the code on the browser process side is submitted + //return webKitClient()->databaseGetFileSize(WebString(fileName)); + return 0LL; +} +#endif + } // namespace WebCore diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 0ae547d..a2d46ce 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -626,6 +626,9 @@ # correct npapi.h inclusion (http://crbug.com/17127 ['exclude', '/third_party/WebKit/WebCore/plugins/PluginDebug.cpp'], ['exclude', '/third_party/WebKit/WebCore/plugins/PluginDebug.h'], + + # Exclude some DB-related files. + ['exclude', '/third_party/WebKit/WebCore/platform/sql/SQLiteFileSystem.cpp'], ], 'sources!': [ # Custom bindings in bindings/v8/custom exist for these. -- cgit v1.1