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.
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_
10 #include "base/basictypes.h"
11 #include "base/strings/string16.h"
12 #include "content/common/indexed_db/indexed_db_key_path.h"
16 struct IndexedDBIndexMetadata
{
17 static const int64 kInvalidId
= -1;
19 IndexedDBIndexMetadata() {}
20 IndexedDBIndexMetadata(const base::string16
& name
,
22 const IndexedDBKeyPath
& key_path
,
29 multi_entry(multi_entry
) {}
32 IndexedDBKeyPath key_path
;
37 struct CONTENT_EXPORT IndexedDBObjectStoreMetadata
{
38 typedef std::map
<int64
, IndexedDBIndexMetadata
> IndexMap
;
40 static const int64 kInvalidId
= -1;
42 IndexedDBObjectStoreMetadata();
43 IndexedDBObjectStoreMetadata(const base::string16
& name
,
45 const IndexedDBKeyPath
& key_path
,
48 ~IndexedDBObjectStoreMetadata();
51 IndexedDBKeyPath key_path
;
58 struct CONTENT_EXPORT IndexedDBDatabaseMetadata
{
59 // TODO(jsbell): These can probably be collapsed into 0.
62 DEFAULT_INT_VERSION
= 0
65 typedef std::map
<int64
, IndexedDBObjectStoreMetadata
> ObjectStoreMap
;
67 IndexedDBDatabaseMetadata();
68 IndexedDBDatabaseMetadata(const base::string16
& name
,
70 const base::string16
& version
,
72 int64 max_object_store_id
);
73 ~IndexedDBDatabaseMetadata();
77 base::string16 version
;
79 int64 max_object_store_id
;
81 ObjectStoreMap object_stores
;
83 } // namespace content
85 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_