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

Unified Diff: content/browser/indexed_db/indexed_db_transaction.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet still more build fixes. Created 6 years, 7 months 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
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_;

Powered by Google App Engine
This is Rietveld 408576698