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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 2828953002: [IndexedDB] Hold referenced to IDB::put blobs in the IDBRequest (Closed)
Patch Set: 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_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 2ecd7b18d642e4973abb93ff24a562a8ec218617..d340a93e461676afc99dec8d851e9464eae5da73 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -12,6 +12,7 @@
#include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/browser/blob_storage/blob_dispatcher_host.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
#include "content/browser/indexed_db/indexed_db_context_impl.h"
@@ -75,6 +76,7 @@ IndexedDBDispatcherHost::IndexedDBDispatcherHost(
scoped_refptr<ChromeBlobStorageContext> blob_storage_context)
: indexed_db_context_(std::move(indexed_db_context)),
blob_storage_context_(std::move(blob_storage_context)),
+ blob_dispatcher_host_(nullptr),
idb_runner_(indexed_db_context_->TaskRunner()),
ipc_process_id_(ipc_process_id),
weak_factory_(this) {
@@ -109,6 +111,16 @@ void IndexedDBDispatcherHost::AddCursorBinding(
cursor_bindings_.AddBinding(std::move(cursor), std::move(request));
}
+void IndexedDBDispatcherHost::SetBlobDispatcherHost(
+ scoped_refptr<BlobDispatcherHost> host) {
+ blob_dispatcher_host_ = std::move(host);
pwnall 2017/04/21 01:39:22 Would it make sense to DCHECK that the host_ is nu
+}
+
+void IndexedDBDispatcherHost::AckBlobRecievedFromIDB(const std::string& uuid) {
+ DCHECK(blob_dispatcher_host_);
+ blob_dispatcher_host_->AckBlobRecievedFromIDB(uuid);
+}
+
std::string IndexedDBDispatcherHost::HoldBlobData(
const IndexedDBBlobInfo& blob_info) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

Powered by Google App Engine
This is Rietveld 408576698