Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: webkit/tools/test_shell/simple_database_system.h

Issue 203074: Refactor the DB code to make all DB layout tests pass on test_shell.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/tools/test_shell/simple_database_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698