Copy default apps for managed users into artifacts directory (part 2)
[chromium-blink-merge.git] / webkit / database / vfs_backend.h
blob0459958c77859d87d3da82bb7f1c6d994dd03f15
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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_DATABASE_VFS_BACKEND_H_
6 #define WEBKIT_DATABASE_VFS_BACKEND_H_
8 #include "base/platform_file.h"
9 #include "base/process.h"
10 #include "base/string16.h"
11 #include "webkit/storage/webkit_storage_export.h"
13 namespace base {
14 class FilePath;
17 namespace webkit_database {
19 class WEBKIT_STORAGE_EXPORT VfsBackend {
20 public:
21 static void OpenFile(const base::FilePath& file_path,
22 int desired_flags,
23 base::PlatformFile* file_handle);
25 static void OpenTempFileInDirectory(const base::FilePath& dir_path,
26 int desired_flags,
27 base::PlatformFile* file_handle);
29 static int DeleteFile(const base::FilePath& file_path, bool sync_dir);
31 static uint32 GetFileAttributes(const base::FilePath& file_path);
33 static int64 GetFileSize(const base::FilePath& file_path);
35 // Used to make decisions in the DatabaseDispatcherHost.
36 static bool OpenTypeIsReadWrite(int desired_flags);
38 private:
39 static bool OpenFileFlagsAreConsistent(int desired_flags);
42 } // namespace webkit_database
44 #endif // WEBKIT_DATABASE_VFS_BACKEND_H_