OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_ |
| 7 |
| 8 #include "base/file_path.h" |
| 9 #include "base/platform_file.h" |
| 10 #include "base/scoped_temp_dir.h" |
| 11 |
| 12 class SimpleDatabaseSystem { |
| 13 public: |
| 14 static SimpleDatabaseSystem* GetInstance(); |
| 15 SimpleDatabaseSystem(); |
| 16 ~SimpleDatabaseSystem(); |
| 17 |
| 18 base::PlatformFile OpenFile( |
| 19 const FilePath& file_name, int desired_flags, |
| 20 base::PlatformFile* dir_handle); |
| 21 int DeleteFile(const FilePath& file_name, bool sync_dir); |
| 22 long GetFileAttributes(const FilePath& file_name); |
| 23 long long GetFileSize(const FilePath& file_name); |
| 24 void ClearAllDatabases(); |
| 25 |
| 26 private: |
| 27 FilePath GetDBDir(); |
| 28 FilePath GetDBFileFullPath(const FilePath& file_name); |
| 29 |
| 30 static SimpleDatabaseSystem* instance_; |
| 31 |
| 32 ScopedTempDir temp_dir_; |
| 33 |
| 34 // HACK: see OpenFile's implementation |
| 35 base::PlatformFile hack_main_db_handle_; |
| 36 }; |
| 37 |
| 38 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_ |
OLD | NEW |