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 3c305f39d057147c8a8feb12654a0f826404b09a..9c097a99f7f240323b178c09a28eaa498088cdb5 100644 |
--- a/content/browser/indexed_db/indexed_db_connection.h |
+++ b/content/browser/indexed_db/indexed_db_connection.h |
@@ -35,6 +35,9 @@ class CONTENT_EXPORT IndexedDBConnection { |
// connection. |
virtual void RemoveObservers(const std::vector<int32_t>& remove_observer_ids); |
+ void set_id(int32_t id); |
+ int32_t id() const { return id_; } |
+ |
IndexedDBDatabase* database() const { return database_.get(); } |
IndexedDBDatabaseCallbacks* callbacks() const { return callbacks_.get(); } |
const std::vector<std::unique_ptr<IndexedDBObserver>>& active_observers() |
@@ -46,6 +49,10 @@ class CONTENT_EXPORT IndexedDBConnection { |
} |
private: |
+ enum { kInvalidId = -1 }; |
+ // id_ is ipc_database_id |
+ int32_t id_ = kInvalidId; |
+ |
// NULL in some unit tests, and after the connection is closed. |
scoped_refptr<IndexedDBDatabase> database_; |