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

Unified Diff: webkit/tools/test_shell/simple_database_system.h

Issue 384118: Enables most DB layout tests in test_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed the test_expectations.txt line describing the state of hash-change-with-xhr.html. Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/simple_database_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_database_system.h
===================================================================
--- webkit/tools/test_shell/simple_database_system.h (revision 31991)
+++ webkit/tools/test_shell/simple_database_system.h (working copy)
@@ -5,34 +5,57 @@
#ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_
#define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_
-#include "base/file_path.h"
#include "base/platform_file.h"
+#include "base/ref_counted.h"
#include "base/scoped_temp_dir.h"
+#include "base/string16.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebDatabaseObserver.h"
+#include "webkit/database/database_tracker.h"
-class SimpleDatabaseSystem {
+class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
+ public WebKit::WebDatabaseObserver {
public:
static SimpleDatabaseSystem* GetInstance();
SimpleDatabaseSystem();
~SimpleDatabaseSystem();
- base::PlatformFile OpenFile(
- const FilePath& file_name, int desired_flags,
- base::PlatformFile* dir_handle);
- int DeleteFile(const FilePath& file_name, bool sync_dir);
- long GetFileAttributes(const FilePath& file_name);
- long long GetFileSize(const FilePath& file_name);
+ // VFS functions
+ base::PlatformFile OpenFile(const string16& vfs_file_name,
+ int desired_flags,
+ base::PlatformFile* dir_handle);
+ int DeleteFile(const string16& vfs_file_name, bool sync_dir);
+ long GetFileAttributes(const string16& vfs_file_name);
+ long long GetFileSize(const string16& vfs_file_name);
+
+ // database tracker functions
+ void DatabaseOpened(const string16& origin_identifier,
+ const string16& database_name,
+ const string16& description,
+ int64 estimated_size);
+ void DatabaseModified(const string16& origin_identifier,
+ const string16& database_name);
+ void DatabaseClosed(const string16& origin_identifier,
+ const string16& database_name);
+
+ // DatabaseTracker::Observer implementation
+ virtual void OnDatabaseSizeChanged(const string16& origin_identifier,
+ const string16& database_name,
+ int64 database_size,
+ int64 space_available);
+
+ // WebDatabaseObserver implementation
+ virtual void databaseOpened(const WebKit::WebDatabase& database);
+ virtual void databaseModified(const WebKit::WebDatabase& database);
+ virtual void databaseClosed(const WebKit::WebDatabase& database);
+
void ClearAllDatabases();
private:
- FilePath GetDBDir();
- FilePath GetDBFileFullPath(const FilePath& file_name);
-
static SimpleDatabaseSystem* instance_;
ScopedTempDir temp_dir_;
- // HACK: see OpenFile's implementation
- base::PlatformFile hack_main_db_handle_;
+ scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
};
#endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_DATABASE_SYSTEM_H_
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/simple_database_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698