summaryrefslogtreecommitdiffstats
path: root/webkit/database
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 03:27:39 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 03:27:39 +0000
commitbeaafbaf7a599c92912702bc2b5b3e770849a74a (patch)
tree06a9d047770783c16e9cbffe374c3335d3dd9e6b /webkit/database
parentaa5ff891c563531aa38fbee52c36f29c66ca3e54 (diff)
downloadchromium_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 'webkit/database')
-rw-r--r--webkit/database/vfs_backend.cc25
-rw-r--r--webkit/database/vfs_backend.h6
2 files changed, 5 insertions, 26 deletions
diff --git a/webkit/database/vfs_backend.cc b/webkit/database/vfs_backend.cc
index 8cb8e05..0d9cb4f 100644
--- a/webkit/database/vfs_backend.cc
+++ b/webkit/database/vfs_backend.cc
@@ -71,8 +71,7 @@ bool VfsBackend::OpenFileFlagsAreConsistent(int desired_flags) {
void VfsBackend::OpenFile(const FilePath& file_path,
int desired_flags,
base::ProcessHandle handle,
- base::PlatformFile* target_handle,
- base::PlatformFile* target_dir_handle) {
+ base::PlatformFile* target_handle) {
DCHECK(!file_path.empty());
// Verify the flags for consistency and create the database
@@ -118,22 +117,6 @@ void VfsBackend::OpenFile(const FilePath& file_path,
}
#elif defined(OS_POSIX)
*target_handle = file_handle;
-
- int file_type = desired_flags & 0x00007F00;
- bool creating_new_file = (desired_flags & SQLITE_OPEN_CREATE);
- if (creating_new_file && ((file_type == SQLITE_OPEN_MASTER_JOURNAL) ||
- (file_type == SQLITE_OPEN_MAIN_JOURNAL))) {
- // We return a handle to the containing directory because on POSIX
- // systems the VFS might want to fsync it after changing a file.
- // By returning it here, we avoid an extra IPC call.
- *target_dir_handle = base::CreatePlatformFile(
- file_path.DirName().ToWStringHack(),
- base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, NULL);
- if (*target_dir_handle == base::kInvalidPlatformFileValue) {
- base::ClosePlatformFile(*target_handle);
- *target_handle = base::kInvalidPlatformFileValue;
- }
- }
#endif
}
}
@@ -143,8 +126,7 @@ void VfsBackend::OpenTempFileInDirectory(
const FilePath& dir_path,
int desired_flags,
base::ProcessHandle handle,
- base::PlatformFile* target_handle,
- base::PlatformFile* target_dir_handle) {
+ base::PlatformFile* target_handle) {
// We should be able to delete temp files when they're closed
// and create them as needed
if (!(desired_flags & SQLITE_OPEN_DELETEONCLOSE) ||
@@ -157,8 +139,7 @@ void VfsBackend::OpenTempFileInDirectory(
if (!file_util::CreateTemporaryFileInDir(dir_path, &temp_file_path))
return;
- OpenFile(temp_file_path, desired_flags, handle,
- target_handle, target_dir_handle);
+ OpenFile(temp_file_path, desired_flags, handle, target_handle);
}
// static
diff --git a/webkit/database/vfs_backend.h b/webkit/database/vfs_backend.h
index 97ce7e0..267ce90 100644
--- a/webkit/database/vfs_backend.h
+++ b/webkit/database/vfs_backend.h
@@ -18,14 +18,12 @@ class VfsBackend {
static void OpenFile(const FilePath& file_path,
int desired_flags,
base::ProcessHandle handle,
- base::PlatformFile* target_handle,
- base::PlatformFile* target_dir_handle);
+ base::PlatformFile* target_handle);
static void OpenTempFileInDirectory(const FilePath& dir_path,
int desired_flags,
base::ProcessHandle handle,
- base::PlatformFile* target_handle,
- base::PlatformFile* target_dir_handle);
+ base::PlatformFile* target_handle);
static int DeleteFile(const FilePath& file_path, bool sync_dir);