Chromium Code Reviews| 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 4d828e5e6ff5e28a138f19c79959f5a928ab165e..80a3e09f274ccadda542ded01650cccb2a273643 100644 |
| --- a/content/browser/indexed_db/indexed_db_connection.h |
| +++ b/content/browser/indexed_db/indexed_db_connection.h |
| @@ -14,6 +14,7 @@ |
| namespace content { |
| class IndexedDBCallbacks; |
| class IndexedDBDatabaseError; |
| +class IndexedDBObserver; |
| class CONTENT_EXPORT IndexedDBConnection { |
| public: |
| @@ -27,10 +28,13 @@ class CONTENT_EXPORT IndexedDBConnection { |
| virtual bool IsConnected(); |
| void VersionChangeIgnored(); |
| + void Unobserve(std::vector<int32_t> observersToRemove); |
|
dmurph
2016/06/22 01:09:49
const ref, and please use underscore_naming
palakj1
2016/06/23 20:56:29
changed to const ref.
|
| IndexedDBDatabase* database() const { return database_.get(); } |
| IndexedDBDatabaseCallbacks* callbacks() const { return callbacks_.get(); } |
| + std::vector<std::unique_ptr<IndexedDBObserver>> active_observers_; |
| + |
| private: |
| // NULL in some unit tests, and after the connection is closed. |
| scoped_refptr<IndexedDBDatabase> database_; |
| @@ -38,7 +42,6 @@ class CONTENT_EXPORT IndexedDBConnection { |
| // The callbacks_ member is cleared when the connection is closed. |
| // May be NULL in unit tests. |
| scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_; |
| - |
| base::WeakPtrFactory<IndexedDBConnection> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(IndexedDBConnection); |