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 COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ | 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ |
6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ | 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "components/webdata/common/webdata_export.h" |
9 | 10 |
10 namespace sql { | 11 namespace sql { |
11 class Connection; | 12 class Connection; |
12 class MetaTable; | 13 class MetaTable; |
13 } | 14 } |
14 | 15 |
15 // An abstract base class representing a table within a WebDatabase. | 16 // An abstract base class representing a table within a WebDatabase. |
16 // Each table should subclass this, adding type-specific methods as needed. | 17 // Each table should subclass this, adding type-specific methods as needed. |
17 class WebDatabaseTable { | 18 class WEBDATA_EXPORT WebDatabaseTable { |
18 public: | 19 public: |
19 // To look up a WebDatabaseTable of a certain type from WebDatabase, | 20 // To look up a WebDatabaseTable of a certain type from WebDatabase, |
20 // we use a void* key, so that we can simply use the address of one | 21 // we use a void* key, so that we can simply use the address of one |
21 // of the type's statics. | 22 // of the type's statics. |
22 typedef void* TypeKey; | 23 typedef void* TypeKey; |
23 | 24 |
24 // The object is not ready for use until Init() has been called. | 25 // The object is not ready for use until Init() has been called. |
25 WebDatabaseTable(); | 26 WebDatabaseTable(); |
26 virtual ~WebDatabaseTable(); | 27 virtual ~WebDatabaseTable(); |
27 | 28 |
(...skipping 28 matching lines...) Expand all Loading... |
56 // exceeds that of WebDatabase, they should not be used in | 57 // exceeds that of WebDatabase, they should not be used in |
57 // ~WebDatabaseTable. | 58 // ~WebDatabaseTable. |
58 sql::Connection* db_; | 59 sql::Connection* db_; |
59 sql::MetaTable* meta_table_; | 60 sql::MetaTable* meta_table_; |
60 | 61 |
61 private: | 62 private: |
62 DISALLOW_COPY_AND_ASSIGN(WebDatabaseTable); | 63 DISALLOW_COPY_AND_ASSIGN(WebDatabaseTable); |
63 }; | 64 }; |
64 | 65 |
65 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ | 66 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_ |
OLD | NEW |