OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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 WEBKIT_DATABASE_DATABASES_TABLE_H_ |
| 6 #define WEBKIT_DATABASE_DATABASES_TABLE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/string16.h" |
| 11 |
| 12 namespace sql { |
| 13 class Connection; |
| 14 } |
| 15 |
| 16 namespace webkit_database { |
| 17 |
| 18 struct DatabaseDetails { |
| 19 DatabaseDetails() : estimated_size(0) { } |
| 20 |
| 21 string16 origin_identifier; |
| 22 string16 database_name; |
| 23 string16 description; |
| 24 int64 estimated_size; |
| 25 }; |
| 26 |
| 27 class DatabasesTable { |
| 28 public: |
| 29 explicit DatabasesTable(sql::Connection* db) : db_(db) { } |
| 30 |
| 31 bool Init(); |
| 32 bool GetDatabaseDetails(const string16& origin_identifier, |
| 33 const string16& database_name, |
| 34 DatabaseDetails* details); |
| 35 bool InsertDatabaseDetails(const DatabaseDetails& details); |
| 36 bool UpdateDatabaseDetails(const DatabaseDetails& details); |
| 37 bool DeleteDatabaseDetails(const string16& origin_identifier, |
| 38 const string16& database_name); |
| 39 bool GetAllDatabaseDetailsForOrigin(const string16& origin_identifier, |
| 40 std::vector<DatabaseDetails>* details); |
| 41 private: |
| 42 sql::Connection* db_; |
| 43 }; |
| 44 |
| 45 } // namespace webkit_database |
| 46 |
| 47 #endif // WEBKIT_DATABASE_DATABASES_TABLE_H_ |
OLD | NEW |