Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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_COMMON_INDEXED_DB_INDEXED_DB_METADATA_H_ | |
| 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_METADATA_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/string16.h" | |
| 13 #include "indexed_db_key_path.h" | |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBMetadata.h" | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 class IndexedDBObjectStoreMetadata; | |
| 19 class IndexedDBIndexMetadata; | |
| 20 | |
| 21 class CONTENT_EXPORT IndexedDBDatabaseMetadata { | |
|
michaeln
2012/06/08 19:46:51
Do these classes really need the CONTENT_EXPORT?
jsbell
2012/06/08 20:11:57
Nope!
| |
| 22 public: | |
| 23 IndexedDBDatabaseMetadata(); | |
| 24 explicit IndexedDBDatabaseMetadata(const WebKit::WebIDBDatabaseMetadata); | |
|
michaeln
2012/06/08 19:46:51
Do you want this to be a const input arg?
Also we
jsbell
2012/06/08 20:11:57
Oops, missing &.
| |
| 25 ~IndexedDBDatabaseMetadata(); | |
| 26 | |
| 27 const string16& name() const { return name_; } | |
| 28 const string16& version() const { return version_; } | |
| 29 const std::vector<IndexedDBObjectStoreMetadata>& object_stores() const { | |
| 30 return object_stores_; | |
| 31 } | |
| 32 | |
| 33 void Set(const string16& name, | |
| 34 const string16& version, | |
| 35 const std::vector<IndexedDBObjectStoreMetadata>& object_stores); | |
| 36 | |
| 37 operator WebKit::WebIDBDatabaseMetadata() const; | |
| 38 | |
| 39 private: | |
| 40 string16 name_; | |
| 41 string16 version_; | |
| 42 std::vector<IndexedDBObjectStoreMetadata> object_stores_; | |
| 43 }; | |
| 44 | |
| 45 class CONTENT_EXPORT IndexedDBObjectStoreMetadata { | |
| 46 public: | |
| 47 IndexedDBObjectStoreMetadata(); | |
| 48 explicit IndexedDBObjectStoreMetadata( | |
| 49 const WebKit::WebIDBObjectStoreMetadata); | |
| 50 ~IndexedDBObjectStoreMetadata(); | |
| 51 | |
| 52 const string16& name() const { return name_; } | |
| 53 const IndexedDBKeyPath& key_path() const { return key_path_; } | |
| 54 bool auto_increment() const { return auto_increment_; } | |
| 55 const std::vector<IndexedDBIndexMetadata>& indexes() const { | |
| 56 return indexes_; | |
| 57 } | |
| 58 | |
| 59 void Set(const string16& name, | |
| 60 const IndexedDBKeyPath& key_path, | |
| 61 bool auto_increment, | |
| 62 const std::vector<IndexedDBIndexMetadata>& indexes); | |
| 63 | |
| 64 operator WebKit::WebIDBObjectStoreMetadata() const; | |
| 65 | |
| 66 private: | |
| 67 string16 name_; | |
| 68 IndexedDBKeyPath key_path_; | |
| 69 bool auto_increment_; | |
| 70 std::vector<IndexedDBIndexMetadata> indexes_; | |
| 71 }; | |
| 72 | |
| 73 class CONTENT_EXPORT IndexedDBIndexMetadata { | |
| 74 public: | |
| 75 IndexedDBIndexMetadata(); | |
| 76 explicit IndexedDBIndexMetadata(const WebKit::WebIDBIndexMetadata); | |
|
michaeln
2012/06/08 19:46:51
ditto const ref + param name
jsbell
2012/06/08 20:11:57
Done.
| |
| 77 ~IndexedDBIndexMetadata(); | |
| 78 | |
| 79 const string16& name() const { return name_; } | |
| 80 const IndexedDBKeyPath& key_path() const { return key_path_; } | |
| 81 bool unique() const { return unique_; } | |
| 82 bool multi_entry() const { return multi_entry_; } | |
| 83 | |
| 84 void Set(const string16& name, | |
| 85 const IndexedDBKeyPath& key_path, | |
| 86 bool unique, | |
| 87 bool multi_entry); | |
| 88 | |
| 89 operator WebKit::WebIDBIndexMetadata() const; | |
| 90 | |
| 91 private: | |
| 92 string16 name_; | |
| 93 IndexedDBKeyPath key_path_; | |
| 94 bool unique_; | |
| 95 bool multi_entry_; | |
| 96 }; | |
| 97 | |
| 98 } // namespace content | |
| 99 | |
| 100 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | |
| OLD | NEW |