Chromium Code Reviews| 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. |
|
jsbell
2014/05/28 21:29:15
This is sort-of done. The data is passed to the pa
ericu
2014/05/28 22:50:42
Yup.
|
| + bool IsStatePastStarted() const { |
|
jsbell
2014/05/28 21:29:15
It's unclear to me that we need this method...
|
| + 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_; |