| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <map> | |
| 11 | |
| 12 #include "base/strings/string16.h" | |
| 13 #include "content/common/indexed_db/indexed_db_key_path.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 struct CONTENT_EXPORT IndexedDBIndexMetadata { | |
| 18 static const int64_t kInvalidId = -1; | |
| 19 | |
| 20 IndexedDBIndexMetadata(); | |
| 21 IndexedDBIndexMetadata(const base::string16& name, | |
| 22 int64_t id, | |
| 23 const IndexedDBKeyPath& key_path, | |
| 24 bool unique, | |
| 25 bool multi_entry); | |
| 26 IndexedDBIndexMetadata(const IndexedDBIndexMetadata& other); | |
| 27 ~IndexedDBIndexMetadata(); | |
| 28 IndexedDBIndexMetadata& operator=(const IndexedDBIndexMetadata& other); | |
| 29 | |
| 30 base::string16 name; | |
| 31 int64_t id; | |
| 32 IndexedDBKeyPath key_path; | |
| 33 bool unique; | |
| 34 bool multi_entry; | |
| 35 }; | |
| 36 | |
| 37 struct CONTENT_EXPORT IndexedDBObjectStoreMetadata { | |
| 38 | |
| 39 static const int64_t kInvalidId = -1; | |
| 40 | |
| 41 IndexedDBObjectStoreMetadata(); | |
| 42 IndexedDBObjectStoreMetadata(const base::string16& name, | |
| 43 int64_t id, | |
| 44 const IndexedDBKeyPath& key_path, | |
| 45 bool auto_increment, | |
| 46 int64_t max_index_id); | |
| 47 IndexedDBObjectStoreMetadata(const IndexedDBObjectStoreMetadata& other); | |
| 48 ~IndexedDBObjectStoreMetadata(); | |
| 49 IndexedDBObjectStoreMetadata& operator=( | |
| 50 const IndexedDBObjectStoreMetadata& other); | |
| 51 | |
| 52 base::string16 name; | |
| 53 int64_t id; | |
| 54 IndexedDBKeyPath key_path; | |
| 55 bool auto_increment; | |
| 56 int64_t max_index_id; | |
| 57 | |
| 58 std::map<int64_t, IndexedDBIndexMetadata> indexes; | |
| 59 }; | |
| 60 | |
| 61 struct CONTENT_EXPORT IndexedDBDatabaseMetadata { | |
| 62 // TODO(jsbell): These can probably be collapsed into 0. | |
| 63 enum { NO_VERSION = -1, DEFAULT_VERSION = 0 }; | |
| 64 | |
| 65 IndexedDBDatabaseMetadata(); | |
| 66 IndexedDBDatabaseMetadata(const base::string16& name, | |
| 67 int64_t id, | |
| 68 int64_t version, | |
| 69 int64_t max_object_store_id); | |
| 70 IndexedDBDatabaseMetadata(const IndexedDBDatabaseMetadata& other); | |
| 71 ~IndexedDBDatabaseMetadata(); | |
| 72 IndexedDBDatabaseMetadata& operator=(IndexedDBDatabaseMetadata& other); | |
| 73 | |
| 74 base::string16 name; | |
| 75 int64_t id; | |
| 76 int64_t version; | |
| 77 int64_t max_object_store_id; | |
| 78 | |
| 79 std::map<int64_t, IndexedDBObjectStoreMetadata> object_stores; | |
| 80 }; | |
| 81 } // namespace content | |
| 82 | |
| 83 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_ | |
| OLD | NEW |