OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ | 5 #ifndef WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ |
6 #define WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ | 6 #define WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 const string16& description, | 56 const string16& description, |
57 int64 estimated_size); | 57 int64 estimated_size); |
58 void DatabaseModified(const string16& origin_identifier, | 58 void DatabaseModified(const string16& origin_identifier, |
59 const string16& database_name); | 59 const string16& database_name); |
60 void DatabaseClosed(const string16& origin_identifier, | 60 void DatabaseClosed(const string16& origin_identifier, |
61 const string16& database_name); | 61 const string16& database_name); |
62 | 62 |
63 // DatabaseTracker::Observer implementation | 63 // DatabaseTracker::Observer implementation |
64 virtual void OnDatabaseSizeChanged(const string16& origin_identifier, | 64 virtual void OnDatabaseSizeChanged(const string16& origin_identifier, |
65 const string16& database_name, | 65 const string16& database_name, |
66 int64 database_size); | 66 int64 database_size) OVERRIDE; |
67 virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier, | 67 virtual void OnDatabaseScheduledForDeletion( |
68 const string16& database_name); | 68 const string16& origin_identifier, |
| 69 const string16& database_name) OVERRIDE; |
69 | 70 |
70 // Used by our public SQLite VFS methods, only called on the db_thread. | 71 // Used by our public SQLite VFS methods, only called on the db_thread. |
71 void VfsOpenFile(const string16& vfs_file_name, int desired_flags, | 72 void VfsOpenFile(const string16& vfs_file_name, int desired_flags, |
72 base::PlatformFile* result, base::WaitableEvent* done_event); | 73 base::PlatformFile* result, base::WaitableEvent* done_event); |
73 void VfsDeleteFile(const string16& vfs_file_name, bool sync_dir, | 74 void VfsDeleteFile(const string16& vfs_file_name, bool sync_dir, |
74 int* result, base::WaitableEvent* done_event); | 75 int* result, base::WaitableEvent* done_event); |
75 void VfsGetFileAttributes(const string16& vfs_file_name, | 76 void VfsGetFileAttributes(const string16& vfs_file_name, |
76 uint32* result, base::WaitableEvent* done_event); | 77 uint32* result, base::WaitableEvent* done_event); |
77 void VfsGetFileSize(const string16& vfs_file_name, | 78 void VfsGetFileSize(const string16& vfs_file_name, |
78 int64* result, base::WaitableEvent* done_event); | 79 int64* result, base::WaitableEvent* done_event); |
(...skipping 15 matching lines...) Expand all Loading... |
94 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; | 95 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; |
95 int64 quota_per_origin_; | 96 int64 quota_per_origin_; |
96 | 97 |
97 // Data members to support waiting for all connections to be closed. | 98 // Data members to support waiting for all connections to be closed. |
98 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; | 99 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; |
99 | 100 |
100 static SimpleDatabaseSystem* instance_; | 101 static SimpleDatabaseSystem* instance_; |
101 }; | 102 }; |
102 | 103 |
103 #endif // WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ | 104 #endif // WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_ |
OLD | NEW |