| Index: blimp/engine/mojo/blob_channel_service.cc
|
| diff --git a/blimp/engine/mojo/blob_channel_service.cc b/blimp/engine/mojo/blob_channel_service.cc
|
| index a717d960d1555ce040022d0aed73dcdad23d652d..d51c9249b7afe8046b5de7d6faeeef98222a35d5 100644
|
| --- a/blimp/engine/mojo/blob_channel_service.cc
|
| +++ b/blimp/engine/mojo/blob_channel_service.cc
|
| @@ -4,8 +4,12 @@
|
|
|
| #include "blimp/engine/mojo/blob_channel_service.h"
|
|
|
| +#include <string>
|
| +#include <unordered_map>
|
| #include <utility>
|
| +#include <vector>
|
|
|
| +#include "base/memory/ptr_util.h"
|
| #include "blimp/net/blob_channel/blob_channel_sender.h"
|
| #include "mojo/public/cpp/system/buffer.h"
|
|
|
| @@ -21,7 +25,17 @@ BlobChannelService::BlobChannelService(BlobChannelSender* blob_channel_sender,
|
|
|
| BlobChannelService::~BlobChannelService() {}
|
|
|
| -void BlobChannelService::PutBlob(const mojo::String& id,
|
| +void BlobChannelService::GetCachedBlobIds(
|
| + const BlobChannelService::GetCachedBlobIdsCallback& response_callback) {
|
| + VLOG(1) << "BlobChannel::GetCachedBlobIds called.";
|
| + std::unordered_map<std::string, bool> cache_state;
|
| + for (const auto& next_entry : blob_channel_sender_->GetCachedBlobIds()) {
|
| + cache_state[next_entry.id] = next_entry.was_delivered;
|
| + }
|
| + response_callback.Run(std::move(cache_state));
|
| +}
|
| +
|
| +void BlobChannelService::PutBlob(const std::string& id,
|
| mojo::ScopedSharedBufferHandle data,
|
| uint32_t size) {
|
| // Map |data| into the address space and copy out its contents.
|
| @@ -43,7 +57,7 @@ void BlobChannelService::PutBlob(const mojo::String& id,
|
| blob_channel_sender_->PutBlob(id, std::move(new_blob));
|
| }
|
|
|
| -void BlobChannelService::DeliverBlob(const mojo::String& id) {
|
| +void BlobChannelService::DeliverBlob(const std::string& id) {
|
| blob_channel_sender_->DeliverBlob(id);
|
| }
|
|
|
|
|