From d578892cb26c7645179ebacd02edeccb2d3ba696 Mon Sep 17 00:00:00 2001 From: "dumi@chromium.org" Date: Fri, 14 May 2010 02:31:54 +0000 Subject: Clean up the last bits of the dirfd parameter that was used by SQLiteFileSystemChromiumPosix. TEST=none BUG=none Review URL: http://codereview.chromium.org/2087003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47234 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/database_util.cc | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'chrome/common/database_util.cc') diff --git a/chrome/common/database_util.cc b/chrome/common/database_util.cc index fe196c6..7af72c0 100644 --- a/chrome/common/database_util.cc +++ b/chrome/common/database_util.cc @@ -20,25 +20,15 @@ using WebKit::WebString; WebKitClient::FileHandle DatabaseUtil::databaseOpenFile( const WebString& vfs_file_name, int desired_flags) { - IPC::PlatformFileForTransit file_handle; -#if defined(OS_WIN) - file_handle = base::kInvalidPlatformFileValue; -#elif defined(OS_POSIX) - file_handle = - base::FileDescriptor(base::kInvalidPlatformFileValue, true); -#endif + IPC::PlatformFileForTransit file_handle = + IPC::InvalidPlatformFileForTransit(); scoped_refptr filter = ChildThread::current()->sync_message_filter(); - filter->Send(new ViewHostMsg_DatabaseOpenFile( vfs_file_name, desired_flags, &file_handle)); -#if defined(OS_WIN) - return file_handle; -#elif defined(OS_POSIX) - return file_handle.fd; -#endif + return IPC::PlatformFileForTransitToPlatformFile(file_handle); } int DatabaseUtil::databaseDeleteFile( -- cgit v1.1