OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 int64_t id; | 54 int64_t id; |
55 IndexedDBKeyPath key_path; | 55 IndexedDBKeyPath key_path; |
56 bool auto_increment; | 56 bool auto_increment; |
57 int64_t max_index_id; | 57 int64_t max_index_id; |
58 | 58 |
59 IndexMap indexes; | 59 IndexMap indexes; |
60 }; | 60 }; |
61 | 61 |
62 struct CONTENT_EXPORT IndexedDBDatabaseMetadata { | 62 struct CONTENT_EXPORT IndexedDBDatabaseMetadata { |
63 // TODO(jsbell): These can probably be collapsed into 0. | 63 // TODO(jsbell): These can probably be collapsed into 0. |
64 enum { | 64 enum { NO_VERSION = -1, DEFAULT_VERSION = 0 }; |
65 NO_INT_VERSION = -1, | |
66 DEFAULT_INT_VERSION = 0 | |
67 }; | |
68 | 65 |
69 typedef std::map<int64_t, IndexedDBObjectStoreMetadata> ObjectStoreMap; | 66 typedef std::map<int64_t, IndexedDBObjectStoreMetadata> ObjectStoreMap; |
70 | 67 |
71 IndexedDBDatabaseMetadata(); | 68 IndexedDBDatabaseMetadata(); |
72 IndexedDBDatabaseMetadata(const base::string16& name, | 69 IndexedDBDatabaseMetadata(const base::string16& name, |
73 int64_t id, | 70 int64_t id, |
74 int64_t int_version, | 71 int64_t version, |
75 int64_t max_object_store_id); | 72 int64_t max_object_store_id); |
76 IndexedDBDatabaseMetadata(const IndexedDBDatabaseMetadata& other); | 73 IndexedDBDatabaseMetadata(const IndexedDBDatabaseMetadata& other); |
77 ~IndexedDBDatabaseMetadata(); | 74 ~IndexedDBDatabaseMetadata(); |
78 IndexedDBDatabaseMetadata& operator=(IndexedDBDatabaseMetadata& other); | 75 IndexedDBDatabaseMetadata& operator=(IndexedDBDatabaseMetadata& other); |
79 | 76 |
80 base::string16 name; | 77 base::string16 name; |
81 int64_t id; | 78 int64_t id; |
82 int64_t int_version; | 79 int64_t version; |
83 int64_t max_object_store_id; | 80 int64_t max_object_store_id; |
84 | 81 |
85 ObjectStoreMap object_stores; | 82 ObjectStoreMap object_stores; |
86 }; | 83 }; |
87 } // namespace content | 84 } // namespace content |
88 | 85 |
89 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | 86 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ |
OLD | NEW |