Index: content/browser/indexed_db/indexed_db_transaction.h |
diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h |
index a898d85c73145755efcc20ddce77f48ad052d116..c992e275a791bd783354a854df04154dea6658da 100644 |
--- a/content/browser/indexed_db/indexed_db_transaction.h |
+++ b/content/browser/indexed_db/indexed_db_transaction.h |
@@ -20,6 +20,7 @@ |
namespace content { |
+class BlobWriteCallbackImpl; |
class IndexedDBCursor; |
class IndexedDBDatabaseCallbacks; |
@@ -67,9 +68,11 @@ class CONTENT_EXPORT IndexedDBTransaction |
IndexedDBDatabaseCallbacks* connection() const { return callbacks_; } |
enum State { |
- CREATED, // Created, but not yet started by coordinator. |
- STARTED, // Started by the coordinator. |
- FINISHED, // Either aborted or committed. |
+ CREATED, // Created, but not yet started by coordinator. |
+ STARTED, // Started by the coordinator. |
+ COMMITTING, // In the process of committing, possibly waiting for blobs |
+ // to be written. |
+ FINISHED, // Either aborted or committed. |
}; |
State state() const { return state_; } |
@@ -85,6 +88,12 @@ class CONTENT_EXPORT IndexedDBTransaction |
const Diagnostics& diagnostics() const { return diagnostics_; } |
private: |
+ friend class BlobWriteCallbackImpl; |
+ |
+ // TODO(ericu): Report this on the internals page. |
+ bool IsStatePastStarted() const { |
+ return state_ == COMMITTING || state_ == FINISHED; |
+ } |
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTestMode, AbortPreemptive); |
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTest, Timeout); |
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTest, |
@@ -100,8 +109,10 @@ class CONTENT_EXPORT IndexedDBTransaction |
bool IsTaskQueueEmpty() const; |
bool HasPendingTasks() const; |
+ void BlobWriteComplete(bool success); |
void ProcessTaskQueue(); |
void CloseOpenCursors(); |
+ void CommitPhaseTwo(); |
void Timeout(); |
const int64 id_; |