Index: content/browser/blob_storage/blob_internals_url_loader.cc |
diff --git a/content/browser/blob_storage/blob_internals_url_loader.cc b/content/browser/blob_storage/blob_internals_url_loader.cc |
index fe5d62b2c706e4297a8b8b9b2a63e63ee019862d..84906c806d8dfdb8d83e2fa050f197d7488c0840 100644 |
--- a/content/browser/blob_storage/blob_internals_url_loader.cc |
+++ b/content/browser/blob_storage/blob_internals_url_loader.cc |
@@ -26,16 +26,7 @@ void StartBlobInternalsURLLoader( |
std::string output = storage::ViewBlobInternalsJob::GenerateHTML( |
blob_storage_context->context()); |
- |
- MojoCreateDataPipeOptions options; |
- options.struct_size = sizeof(MojoCreateDataPipeOptions); |
- options.flags = MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE; |
- options.element_num_bytes = 1; |
- options.capacity_num_bytes = output.size(); |
- mojo::DataPipe data_pipe(options); |
- |
- DCHECK(data_pipe.producer_handle.is_valid()); |
- DCHECK(data_pipe.consumer_handle.is_valid()); |
+ mojo::DataPipe data_pipe(output.size()); |
void* buffer = nullptr; |
uint32_t num_bytes = output.size(); |
@@ -50,14 +41,7 @@ void StartBlobInternalsURLLoader( |
CHECK_EQ(result, MOJO_RESULT_OK); |
client->OnStartLoadingResponseBody(std::move(data_pipe.consumer_handle)); |
- |
- ResourceRequestCompletionStatus request_complete_data; |
- request_complete_data.error_code = net::OK; |
- request_complete_data.exists_in_cache = false; |
- request_complete_data.completion_time = base::TimeTicks::Now(); |
- request_complete_data.encoded_data_length = output.size(); |
- request_complete_data.encoded_body_length = output.size(); |
- client->OnComplete(request_complete_data); |
+ client->OnComplete(ResourceRequestCompletionStatus(output.size())); |
} |
} // namespace content |