| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class LevelDBComparator; | 39 class LevelDBComparator; |
| 40 class LevelDBDatabase; | 40 class LevelDBDatabase; |
| 41 class LevelDBTransaction; | 41 class LevelDBTransaction; |
| 42 class IDBFactoryBackendImpl; | 42 class IDBFactoryBackendImpl; |
| 43 class IDBKey; | 43 class IDBKey; |
| 44 class IDBKeyRange; | 44 class IDBKeyRange; |
| 45 class SecurityOrigin; | 45 class SecurityOrigin; |
| 46 | 46 |
| 47 class LevelDBFactory { |
| 48 public: |
| 49 virtual PassOwnPtr<LevelDBDatabase> openLevelDB(const String& fileName, cons
t LevelDBComparator*) = 0; |
| 50 virtual bool destroyLevelDB(const String& fileName) = 0; |
| 51 }; |
| 52 |
| 47 class IDBBackingStore : public RefCounted<IDBBackingStore> { | 53 class IDBBackingStore : public RefCounted<IDBBackingStore> { |
| 48 public: | 54 public: |
| 49 class Transaction; | 55 class Transaction; |
| 50 | 56 |
| 51 virtual ~IDBBackingStore(); | 57 virtual ~IDBBackingStore(); |
| 52 static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathB
ase, const String& fileIdentifier, IDBFactoryBackendImpl*); | 58 static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathB
ase, const String& fileIdentifier, IDBFactoryBackendImpl*); |
| 59 static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathB
ase, const String& fileIdentifier, IDBFactoryBackendImpl*, LevelDBFactory*); |
| 53 | 60 |
| 54 virtual Vector<String> getDatabaseNames(); | 61 virtual Vector<String> getDatabaseNames(); |
| 55 virtual bool getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata*
, bool& success) WARN_UNUSED_RETURN; | 62 virtual bool getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata*
, bool& success) WARN_UNUSED_RETURN; |
| 56 virtual bool createIDBDatabaseMetaData(const String& name, const String& ver
sion, int64_t intVersion, int64_t& rowId); | 63 virtual bool createIDBDatabaseMetaData(const String& name, const String& ver
sion, int64_t intVersion, int64_t& rowId); |
| 57 virtual bool updateIDBDatabaseMetaData(IDBBackingStore::Transaction*, int64_
t rowId, const String& version); | 64 virtual bool updateIDBDatabaseMetaData(IDBBackingStore::Transaction*, int64_
t rowId, const String& version); |
| 58 virtual bool updateIDBDatabaseIntVersion(IDBBackingStore::Transaction*, int6
4_t rowId, int64_t intVersion); | 65 virtual bool updateIDBDatabaseIntVersion(IDBBackingStore::Transaction*, int6
4_t rowId, int64_t intVersion); |
| 59 virtual bool deleteDatabase(const String& name); | 66 virtual bool deleteDatabase(const String& name); |
| 60 | 67 |
| 61 void getObjectStores(int64_t databaseId, IDBDatabaseMetadata::ObjectStoreMap
*); | 68 void getObjectStores(int64_t databaseId, IDBDatabaseMetadata::ObjectStoreMap
*); |
| 62 virtual bool createObjectStore(IDBBackingStore::Transaction*, int64_t databa
seId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoInc
rement); | 69 virtual bool createObjectStore(IDBBackingStore::Transaction*, int64_t databa
seId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoInc
rement); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 OwnPtr<LevelDBDatabase> m_db; | 182 OwnPtr<LevelDBDatabase> m_db; |
| 176 OwnPtr<LevelDBComparator> m_comparator; | 183 OwnPtr<LevelDBComparator> m_comparator; |
| 177 | 184 |
| 178 }; | 185 }; |
| 179 | 186 |
| 180 } // namespace WebCore | 187 } // namespace WebCore |
| 181 | 188 |
| 182 #endif // ENABLE(INDEXED_DATABASE) | 189 #endif // ENABLE(INDEXED_DATABASE) |
| 183 | 190 |
| 184 #endif // IDBBackingStore_h | 191 #endif // IDBBackingStore_h |
| OLD | NEW |