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

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: Merged out--bot failed due to staleness. 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..a28a9d46e52690dac0379da23dc4f4be84f68cda 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,8 @@ class CONTENT_EXPORT IndexedDBTransaction
const Diagnostics& diagnostics() const { return diagnostics_; }
private:
+ friend class BlobWriteCallbackImpl;
+
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTestMode, AbortPreemptive);
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTest, Timeout);
FRIEND_TEST_ALL_PREFIXES(IndexedDBTransactionTest,
@@ -100,8 +105,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_;
« no previous file with comments | « content/browser/indexed_db/indexed_db_leveldb_coding.h ('k') | content/browser/indexed_db/indexed_db_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698