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

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

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: added comments and bug link Created 3 years, 11 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_connection.h
diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
index 20acb7b7244c0ed10041c8a59b955c37bf2c2419..e691195573844d038605e1397fbadfe8e1a3d4dd 100644
--- a/content/browser/indexed_db/indexed_db_connection.h
+++ b/content/browser/indexed_db/indexed_db_connection.h
@@ -77,9 +77,19 @@ class CONTENT_EXPORT IndexedDBConnection {
// TODO(dmurph): Change that so this doesn't need to ignore unknown ids.
void RemoveTransaction(int64_t id);
+ // Returns a new transaction id for an observer transaction.
+ // Unique per connection.
+ int64_t NewObserverTransactionId();
+
private:
const int32_t id_;
+ // The renderer-created transactions are in the right 32 bits of the
+ // transaction id, and the observer (browser-created) transactions are in the
+ // left 32 bits.
+ // This keeps track of the left 32 bits. Unsigned for defined overflow.
+ uint32_t next_observer_transaction_id_ = 1;
+
// The process id of the child process this connection is associated with.
// Tracked for IndexedDBContextImpl::GetAllOriginsDetails and debugging.
const int child_process_id_;
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698