| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_DATABASE_VFS_BACKEND_H_ | 5 #ifndef WEBKIT_DATABASE_VFS_BACKEND_H_ |
| 6 #define WEBKIT_DATABASE_VFS_BACKEND_H_ | 6 #define WEBKIT_DATABASE_VFS_BACKEND_H_ |
| 7 | 7 |
| 8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "webkit/storage/webkit_storage_export.h" | 11 #include "webkit/storage/webkit_storage_export.h" |
| 12 | 12 |
| 13 namespace base { |
| 13 class FilePath; | 14 class FilePath; |
| 15 } |
| 14 | 16 |
| 15 namespace webkit_database { | 17 namespace webkit_database { |
| 16 | 18 |
| 17 class WEBKIT_STORAGE_EXPORT VfsBackend { | 19 class WEBKIT_STORAGE_EXPORT VfsBackend { |
| 18 public: | 20 public: |
| 19 static void OpenFile(const FilePath& file_path, | 21 static void OpenFile(const base::FilePath& file_path, |
| 20 int desired_flags, | 22 int desired_flags, |
| 21 base::PlatformFile* file_handle); | 23 base::PlatformFile* file_handle); |
| 22 | 24 |
| 23 static void OpenTempFileInDirectory(const FilePath& dir_path, | 25 static void OpenTempFileInDirectory(const base::FilePath& dir_path, |
| 24 int desired_flags, | 26 int desired_flags, |
| 25 base::PlatformFile* file_handle); | 27 base::PlatformFile* file_handle); |
| 26 | 28 |
| 27 static int DeleteFile(const FilePath& file_path, bool sync_dir); | 29 static int DeleteFile(const base::FilePath& file_path, bool sync_dir); |
| 28 | 30 |
| 29 static uint32 GetFileAttributes(const FilePath& file_path); | 31 static uint32 GetFileAttributes(const base::FilePath& file_path); |
| 30 | 32 |
| 31 static int64 GetFileSize(const FilePath& file_path); | 33 static int64 GetFileSize(const base::FilePath& file_path); |
| 32 | 34 |
| 33 // Used to make decisions in the DatabaseDispatcherHost. | 35 // Used to make decisions in the DatabaseDispatcherHost. |
| 34 static bool OpenTypeIsReadWrite(int desired_flags); | 36 static bool OpenTypeIsReadWrite(int desired_flags); |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 static bool OpenFileFlagsAreConsistent(int desired_flags); | 39 static bool OpenFileFlagsAreConsistent(int desired_flags); |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace webkit_database | 42 } // namespace webkit_database |
| 41 | 43 |
| 42 #endif // WEBKIT_DATABASE_VFS_BACKEND_H_ | 44 #endif // WEBKIT_DATABASE_VFS_BACKEND_H_ |
| OLD | NEW |