Chromium Code Reviews| 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); |