Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2007)

Unified Diff: Source/modules/indexeddb/IDBDatabaseBackendImpl.h

Issue 78053006: [oilpan] Move IDBDatabase, IDBDatabaseCallbacks, IDBDatabaseBackendInterface and other related clas… (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | Source/modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBDatabaseBackendImpl.h
diff --git a/Source/modules/indexeddb/IDBDatabaseBackendImpl.h b/Source/modules/indexeddb/IDBDatabaseBackendImpl.h
index 7ce800721cf1ce5db1aa1fd5cb546d3536b544ff..daf0a2decf1c96d0449f1a44c8105270d9c775fa 100644
--- a/Source/modules/indexeddb/IDBDatabaseBackendImpl.h
+++ b/Source/modules/indexeddb/IDBDatabaseBackendImpl.h
@@ -43,7 +43,7 @@ class IDBTransactionCoordinator;
class IDBDatabaseBackendImpl : public IDBDatabaseBackendInterface {
public:
- static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStore* database, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
+ static IDBDatabaseBackendImpl* create(const String& name, IDBBackingStore* database, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
virtual ~IDBDatabaseBackendImpl();
PassRefPtr<IDBBackingStore> backingStore() const;
@@ -55,15 +55,15 @@ public:
void addIndex(int64_t objectStoreId, const IDBIndexMetadata&, int64_t newMaxIndexId);
void removeIndex(int64_t objectStoreId, int64_t indexId);
- void openConnection(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, int64_t version);
- void deleteDatabase(PassRefPtr<IDBCallbacks>);
+ void openConnection(IDBCallbacks*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t version);
+ void deleteDatabase(IDBCallbacks*);
const IDBDatabaseMetadata& metadata() const { return m_metadata; }
// IDBDatabaseBackendInterface
virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
- virtual void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode);
- virtual void close(PassRefPtr<IDBDatabaseCallbacks>);
+ virtual void createTransaction(int64_t transactionId, IDBDatabaseCallbacks*, const Vector<int64_t>& objectStoreIds, unsigned short mode);
+ virtual void close(IDBDatabaseCallbacks*);
virtual void commit(int64_t transactionId);
virtual void abort(int64_t transactionId);
@@ -78,25 +78,27 @@ public:
void transactionFinishedAndCompleteFired(PassRefPtr<IDBTransactionBackendImpl>);
void transactionFinishedAndAbortFired(PassRefPtr<IDBTransactionBackendImpl>);
- virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, bool keyOnly, PassRefPtr<IDBCallbacks>) OVERRIDE;
- virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE;
+ virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, bool keyOnly, IDBCallbacks*) OVERRIDE;
+ virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, IDBCallbacks*, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE;
virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE;
virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds) OVERRIDE;
- virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<IDBCallbacks>) OVERRIDE;
- virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) OVERRIDE;
- virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) OVERRIDE;
- virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) OVERRIDE;
+ virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, IDBCallbacks*) OVERRIDE;
+ virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IDBCallbacks*) OVERRIDE;
+ virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, IDBCallbacks*) OVERRIDE;
+ virtual void clear(int64_t transactionId, int64_t objectStoreId, IDBCallbacks*) OVERRIDE;
+
+ virtual void trace(Visitor*);
private:
IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
bool openInternal();
- void runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, int64_t requestedVersion);
+ void runIntVersionChangeTransaction(IDBCallbacks*, IDBDatabaseCallbacks*, int64_t transactionId, int64_t requestedVersion);
size_t connectionCount();
void processPendingCalls();
bool isDeleteDatabaseBlocked();
- void deleteDatabaseFinal(PassRefPtr<IDBCallbacks>);
+ void deleteDatabaseFinal(IDBCallbacks*);
class VersionChangeOperation;
@@ -108,8 +110,7 @@ private:
String m_identifier;
// This might not need to be a RefPtr since the factory's lifetime is that of the page group, but it's better to be conservitive than sorry.
- // FIXME(oilpan): Move IDBDatabaseBackendInterface to the heap and use a Member.
- Persistent<IDBFactoryBackendImpl> m_factory;
+ Member<IDBFactoryBackendImpl> m_factory;
OwnPtr<IDBTransactionCoordinator> m_transactionCoordinator;
RefPtr<IDBTransactionBackendImpl> m_runningVersionChangeTransaction;
@@ -124,7 +125,7 @@ private:
class PendingDeleteCall;
Deque<OwnPtr<PendingDeleteCall> > m_pendingDeleteCalls;
- typedef ListHashSet<RefPtr<IDBDatabaseCallbacks> > DatabaseCallbacksSet;
+ typedef ListHashSet<Member<IDBDatabaseCallbacks> > DatabaseCallbacksSet;
DatabaseCallbacksSet m_databaseCallbacksSet;
bool m_closingConnection;
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | Source/modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698