Pass CreateDirectory errors up to IndexedDB.
[chromium-blink-merge.git] / content / child / database_util.h
blob75bcd20a8b37a55c4e977f4f51668fd0ad3fe296
1 // Copyright (c) 2012 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 CONTENT_CHILD_DATABASE_UTIL_H_
6 #define CONTENT_CHILD_DATABASE_UTIL_H_
8 #include "webkit/glue/webkitplatformsupport_impl.h"
10 namespace IPC {
11 class SyncMessageFilter;
14 namespace content {
15 // A class of utility functions used by RendererWebKitPlatformSupportImpl and
16 // WorkerWebKitPlatformSupportImpl to handle database file accesses.
17 class DatabaseUtil {
18 public:
19 static WebKit::Platform::FileHandle DatabaseOpenFile(
20 const WebKit::WebString& vfs_file_name,
21 int desired_flags,
22 IPC::SyncMessageFilter* sync_message_filter);
23 static int DatabaseDeleteFile(
24 const WebKit::WebString& vfs_file_name,
25 bool sync_dir,
26 IPC::SyncMessageFilter* sync_message_filter);
27 static long DatabaseGetFileAttributes(
28 const WebKit::WebString& vfs_file_name,
29 IPC::SyncMessageFilter* sync_message_filter);
30 static long long DatabaseGetFileSize(
31 const WebKit::WebString& vfs_file_name,
32 IPC::SyncMessageFilter* sync_message_filter);
33 static long long DatabaseGetSpaceAvailable(
34 const WebKit::WebString& origin_identifier,
35 IPC::SyncMessageFilter* sync_message_filter);
38 } // namespace content
40 #endif // CONTENT_CHILD_DATABASE_UTIL_H_