| Index: content/child/blob_storage/blob_transport_controller.cc
|
| diff --git a/content/child/blob_storage/blob_transport_controller.cc b/content/child/blob_storage/blob_transport_controller.cc
|
| index cfd2c05df12e6a41eef348ca89c18d9ac05ab09e..e01b9e967663c4e7d6197a19a865c3b0ffd5d098 100644
|
| --- a/content/child/blob_storage/blob_transport_controller.cc
|
| +++ b/content/child/blob_storage/blob_transport_controller.cc
|
| @@ -13,6 +13,7 @@
|
| #include "base/stl_util.h"
|
| #include "content/child/blob_storage/blob_consolidation.h"
|
| #include "content/child/thread_safe_sender.h"
|
| +#include "content/common/fileapi/webblob_messages.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "storage/common/blob_storage/blob_item_bytes_request.h"
|
| #include "storage/common/blob_storage/blob_item_bytes_response.h"
|
| @@ -46,16 +47,13 @@ BlobTransportController::~BlobTransportController() {}
|
|
|
| void BlobTransportController::InitiateBlobTransfer(
|
| const std::string& uuid,
|
| - const std::string& type,
|
| scoped_ptr<BlobConsolidation> consolidation,
|
| IPC::Sender* sender) {
|
| BlobConsolidation* consolidation_ptr = consolidation.get();
|
| - blob_storage_.insert(std::make_pair(uuid, std::move(consolidation)));
|
| + blob_storage_[uuid] = std::move(consolidation);
|
| std::vector<storage::DataElement> descriptions;
|
| GetDescriptions(consolidation_ptr, kLargeThresholdBytes, &descriptions);
|
| - // TODO(dmurph): Uncomment when IPC messages are added.
|
| - // sender->Send(new BlobStorageMsg_StartBuildingBlob(uuid, type,
|
| - // descriptions));
|
| + sender->Send(new BlobStorageMsg_StartBuildingBlob(uuid, descriptions));
|
| }
|
|
|
| void BlobTransportController::OnMemoryRequest(
|
| @@ -85,8 +83,7 @@ void BlobTransportController::OnMemoryRequest(
|
| break;
|
| }
|
|
|
| - // TODO(dmurph): Uncomment when IPC messages are added.
|
| - // sender->Send(new BlobStorageMsg_MemoryItemResponse(uuid, responses));
|
| + sender->Send(new BlobStorageMsg_MemoryItemResponse(uuid, responses));
|
| }
|
|
|
| void BlobTransportController::OnCancel(
|
| @@ -100,8 +97,12 @@ void BlobTransportController::OnCancel(
|
| case IPCBlobCreationCancelCode::OUT_OF_MEMORY:
|
| DVLOG(1) << "Out of Memory.";
|
| break;
|
| + case IPCBlobCreationCancelCode::SOURCE_DIED_IN_TRANSIT:
|
| + DVLOG(1)
|
| + << "Sourced died in transit. Invalid cancel reason from the Browser.";
|
| + break;
|
| case IPCBlobCreationCancelCode::FILE_WRITE_FAILED:
|
| - DVLOG(1) << "File Write Failed (Invalid cancel reason!).";
|
| + DVLOG(1) << "File Write Failed.";
|
| break;
|
| }
|
| ReleaseBlobConsolidation(uuid);
|
| @@ -120,8 +121,7 @@ BlobTransportController::BlobTransportController() {}
|
| void BlobTransportController::CancelBlobTransfer(const std::string& uuid,
|
| IPCBlobCreationCancelCode code,
|
| IPC::Sender* sender) {
|
| - // TODO(dmurph): Uncomment when IPC messages are added.
|
| - // sender->Send(new BlobStorageMsg_CancelBuildingBlob(uuid, code));
|
| + sender->Send(new BlobStorageMsg_CancelBuildingBlob(uuid, code));
|
| ReleaseBlobConsolidation(uuid);
|
| }
|
|
|
|
|