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

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

Issue 2727733004: [IndexedDB] Closing mojo connections when renderer quits (Closed)
Patch Set: comments Created 3 years, 8 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_database_callbacks.h
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h
index 1978d720bf7f3a414e671adb6af3645e66ae690c..654195a18ea19d5dd5cc140bda34a3e9a487a986 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h
@@ -8,22 +8,23 @@
#include <stdint.h>
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "content/common/content_export.h"
#include "content/common/indexed_db/indexed_db.mojom.h"
#include "content/public/browser/browser_thread.h"
namespace content {
+class IndexedDBContextImpl;
class IndexedDBDatabaseError;
-class IndexedDBDispatcherHost;
class IndexedDBTransaction;
+// Expected to be constructed on IO thread and called/deleted from IDB thread.
class CONTENT_EXPORT IndexedDBDatabaseCallbacks
: public base::RefCounted<IndexedDBDatabaseCallbacks> {
public:
IndexedDBDatabaseCallbacks(
- scoped_refptr<IndexedDBDispatcherHost> dispatcher_host,
+ scoped_refptr<IndexedDBContextImpl> context,
::indexed_db::mojom::DatabaseCallbacksAssociatedPtrInfo callbacks_info);
virtual void OnForcedClose();
@@ -43,7 +44,8 @@ class CONTENT_EXPORT IndexedDBDatabaseCallbacks
class IOThreadHelper;
- scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
+ bool complete_ = false;
+ scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_database_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698