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

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

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Propogating Changes to Renderer Created 4 years, 5 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 3c305f39d057147c8a8feb12654a0f826404b09a..e754adbaefa9a981cf6ee32512f179620ecdc012 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 setId(int32_t id);
jsbell 2016/07/11 18:25:33 Per style guide, it's OK (preferred?) to name triv
palakj1 2016/07/11 22:25:40 Done.
+ 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,9 +49,11 @@ class CONTENT_EXPORT IndexedDBConnection {
}
private:
+ enum { kInvalidId = -1 };
+ int32_t id_; /* ipc_database_id */
+
// NULL in some unit tests, and after the connection is closed.
scoped_refptr<IndexedDBDatabase> database_;
-
// The callbacks_ member is cleared when the connection is closed.
// May be NULL in unit tests.
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;

Powered by Google App Engine
This is Rietveld 408576698