diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 03:27:39 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 03:27:39 +0000 |
commit | beaafbaf7a599c92912702bc2b5b3e770849a74a (patch) | |
tree | 06a9d047770783c16e9cbffe374c3335d3dd9e6b /chrome/browser/renderer_host | |
parent | aa5ff891c563531aa38fbee52c36f29c66ca3e54 (diff) | |
download | chromium_src-beaafbaf7a599c92912702bc2b5b3e770849a74a.zip chromium_src-beaafbaf7a599c92912702bc2b5b3e770849a74a.tar.gz chromium_src-beaafbaf7a599c92912702bc2b5b3e770849a74a.tar.bz2 |
Remove the dirfd parameter from all Chromium code. The POSIX VFS
doesn't need it.
BUG=43489
TEST=none
Review URL: http://codereview.chromium.org/2055009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/database_dispatcher_host.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/chrome/browser/renderer_host/database_dispatcher_host.cc b/chrome/browser/renderer_host/database_dispatcher_host.cc index 8ce3df7..c77fc37 100644 --- a/chrome/browser/renderer_host/database_dispatcher_host.cc +++ b/chrome/browser/renderer_host/database_dispatcher_host.cc @@ -157,13 +157,12 @@ void DatabaseDispatcherHost::DatabaseOpenFile(const string16& vfs_file_name, IPC::Message* reply_msg) { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); base::PlatformFile target_handle = base::kInvalidPlatformFileValue; - base::PlatformFile target_dir_handle = base::kInvalidPlatformFileValue; string16 origin_identifier; string16 database_name; if (vfs_file_name.empty()) { VfsBackend::OpenTempFileInDirectory(db_tracker_->DatabaseDirectory(), desired_flags, process_handle_, - &target_handle, &target_dir_handle); + &target_handle); } else if (DatabaseUtil::CrackVfsFileName(vfs_file_name, &origin_identifier, &database_name, NULL) && !db_tracker_->IsDatabaseScheduledForDeletion(origin_identifier, @@ -172,23 +171,16 @@ void DatabaseDispatcherHost::DatabaseOpenFile(const string16& vfs_file_name, DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name); if (!db_file.empty()) { VfsBackend::OpenFile(db_file, desired_flags, process_handle_, - &target_handle, &target_dir_handle); + &target_handle); } } -#if defined(OS_POSIX) - if (target_dir_handle >= 0) - close(target_dir_handle); - target_dir_handle = -1; -#endif - ViewHostMsg_DatabaseOpenFile::WriteReplyParams( reply_msg, #if defined(OS_WIN) target_handle #elif defined(OS_POSIX) - base::FileDescriptor(target_handle, true), - base::FileDescriptor(target_dir_handle, true) + base::FileDescriptor(target_handle, true) #endif ); Send(reply_msg); |