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. 4 5#ifndef CONTENT_CHILD_DATABASE_UTIL_H_ 6#define CONTENT_CHILD_DATABASE_UTIL_H_ 7 8#include "content/child/blink_platform_impl.h" 9 10namespace IPC { 11class SyncMessageFilter; 12} 13 14namespace content { 15// A class of utility functions used by RendererWebKitPlatformSupportImpl and 16// WorkerWebKitPlatformSupportImpl to handle database file accesses. 17class DatabaseUtil { 18 public: 19 static blink::Platform::FileHandle DatabaseOpenFile( 20 const blink::WebString& vfs_file_name, 21 int desired_flags, 22 IPC::SyncMessageFilter* sync_message_filter); 23 static int DatabaseDeleteFile( 24 const blink::WebString& vfs_file_name, 25 bool sync_dir, 26 IPC::SyncMessageFilter* sync_message_filter); 27 static long DatabaseGetFileAttributes( 28 const blink::WebString& vfs_file_name, 29 IPC::SyncMessageFilter* sync_message_filter); 30 static long long DatabaseGetFileSize( 31 const blink::WebString& vfs_file_name, 32 IPC::SyncMessageFilter* sync_message_filter); 33 static long long DatabaseGetSpaceAvailable( 34 const blink::WebString& origin_identifier, 35 IPC::SyncMessageFilter* sync_message_filter); 36}; 37 38} // namespace content 39 40#endif // CONTENT_CHILD_DATABASE_UTIL_H_ 41