| Index: content/browser/indexed_db/indexed_db_database.h
|
| diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h
|
| index 527b516708fe885e6c6065ec39ca61e9b22597c6..70d9b54d4a73da4079cdc2c6eeecd8e32633ebc9 100644
|
| --- a/content/browser/indexed_db/indexed_db_database.h
|
| +++ b/content/browser/indexed_db/indexed_db_database.h
|
| @@ -267,6 +267,9 @@ class CONTENT_EXPORT IndexedDBDatabase
|
| typedef std::map<int64_t, IndexedDBTransaction*> TransactionMap;
|
| typedef list_set<IndexedDBConnection*> ConnectionSet;
|
|
|
| + bool IsUpgradeRunning() const;
|
| + bool IsUpgradePendingOrRunning() const;
|
| +
|
| bool IsOpenConnectionBlocked() const;
|
| leveldb::Status OpenInternal();
|
| void RunVersionChangeTransaction(
|
| @@ -307,11 +310,38 @@ class CONTENT_EXPORT IndexedDBDatabase
|
| IndexedDBTransactionCoordinator transaction_coordinator_;
|
|
|
| TransactionMap transactions_;
|
| +
|
| + // An open request ends up here if:
|
| + // * There is a running or pending upgrade.
|
| + // * There are pending deletes.
|
| + // Requests here have *not* broadcast OnVersionChange if necessary.
|
| + // When no longer blocked, the OpenConnection() calls are remade.
|
| std::queue<IndexedDBPendingConnection> pending_open_calls_;
|
| +
|
| + // This owns the connection for the first upgrade request (open with higher
|
| + // version) that could not be immediately processed. The request has already
|
| + // broadcast OnVersionChange if necessary.
|
| std::unique_ptr<PendingUpgradeCall>
|
| pending_run_version_change_transaction_call_;
|
| +
|
| + // This references a connection for an upgrade request while the upgrade
|
| + // transaction is running, so that the success/error result can be sent. It
|
| + // is not set until the upgrade transaction actually starts executing
|
| + // operations, so do not rely on it to determine if an upgrade is in
|
| + // progress.
|
| std::unique_ptr<PendingSuccessCall> pending_second_half_open_;
|
| - std::list<PendingDeleteCall*> pending_delete_calls_;
|
| +
|
| + // A delete request ends up here if:
|
| + // * There is a running upgrade.
|
| + // Requests here have *not* broadcast OnVersionChange if necessary.
|
| + // When no longer blocked, DeleteDatabase() calls are remade.
|
| + std::list<std::unique_ptr<PendingDeleteCall>> pending_delete_calls_;
|
| +
|
| + // A delete request ends up here if:
|
| + // * There are open connections.
|
| + // Requests here have already broadcast OnVersionChange if necessary.
|
| + // When no longer blocked, DeleteDatabaseFinal() calls are made.
|
| + std::list<std::unique_ptr<PendingDeleteCall>> blocked_delete_calls_;
|
|
|
| ConnectionSet connections_;
|
| bool experimental_web_platform_features_enabled_;
|
|
|