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 72d65ce723e985a331cdd2c3e286af32d2ade7c3..fd03086664a3560f415e5cc9031d20ea332643f9 100644 |
--- a/content/browser/indexed_db/indexed_db_database.h |
+++ b/content/browser/indexed_db/indexed_db_database.h |
@@ -264,6 +264,9 @@ class CONTENT_EXPORT IndexedDBDatabase |
typedef std::list<PendingDeleteCall*> PendingDeleteCallList; |
typedef list_set<IndexedDBConnection*> ConnectionSet; |
+ bool IsUpgradeRunning() const; |
+ bool IsUpgradePendingOrRunning() const; |
+ |
bool IsOpenConnectionBlocked() const; |
leveldb::Status OpenInternal(); |
void RunVersionChangeTransaction( |
@@ -304,12 +307,39 @@ 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. |
PendingOpenCallList 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_; |
+ |
+ // 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. |
PendingDeleteCallList 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. |
+ PendingDeleteCallList blocked_delete_calls_; |
cmumford
2016/06/23 21:44:20
Why do we use a std::list instead of std::queue?
jsbell
2016/06/23 22:26:50
No good reason; probably ported mechanically from
jsbell
2016/06/23 23:00:27
Ah, I remember. you can't iterate over a std::queu
palakj1
2016/06/24 03:41:40
nit: the names pending_delete_calls_ and blocked_d
|
+ |
ConnectionSet connections_; |
bool experimental_web_platform_features_enabled_; |