Index: ipc/ipc_message_pipe_reader.cc |
diff --git a/ipc/ipc_message_pipe_reader.cc b/ipc/ipc_message_pipe_reader.cc |
index 4d8ec8e503d595750e246e2d8e113114eed606ac..8e1b35565bfec09fbabb25835542fbd3e403f627 100644 |
--- a/ipc/ipc_message_pipe_reader.cc |
+++ b/ipc/ipc_message_pipe_reader.cc |
@@ -86,20 +86,20 @@ |
"MessagePipeReader::Send", |
message->flags(), |
TRACE_EVENT_FLAG_FLOW_OUT); |
- base::Optional<std::vector<mojom::SerializedHandlePtr>> handles; |
+ mojo::Array<mojom::SerializedHandlePtr> handles(nullptr); |
MojoResult result = MOJO_RESULT_OK; |
result = ChannelMojo::ReadFromMessageAttachmentSet(message.get(), &handles); |
if (result != MOJO_RESULT_OK) |
return false; |
- std::vector<uint8_t> data(message->size()); |
+ mojo::Array<uint8_t> data(message->size()); |
std::copy(reinterpret_cast<const uint8_t*>(message->data()), |
reinterpret_cast<const uint8_t*>(message->data()) + message->size(), |
- data.data()); |
+ &data[0]); |
MessageSerializer serializer; |
mojom::ChannelProxy proxy(&serializer); |
- proxy.Receive(data, std::move(handles)); |
+ proxy.Receive(std::move(data), std::move(handles)); |
mojo::Message* mojo_message = serializer.message(); |
size_t num_handles = mojo_message->handles()->size(); |
@@ -127,11 +127,11 @@ |
} |
void MessagePipeReader::Receive( |
- const std::vector<uint8_t>& data, |
- base::Optional<std::vector<mojom::SerializedHandlePtr>> handles) { |
+ mojo::Array<uint8_t> data, |
+ mojo::Array<mojom::SerializedHandlePtr> handles) { |
DCHECK_NE(peer_pid_, base::kNullProcessId); |
Message message( |
- data.empty() ? "" : reinterpret_cast<const char*>(data.data()), |
+ data.size() == 0 ? "" : reinterpret_cast<const char*>(&data[0]), |
static_cast<uint32_t>(data.size())); |
message.set_sender_pid(peer_pid_); |
@@ -151,7 +151,7 @@ |
} |
void MessagePipeReader::GetAssociatedInterface( |
- const std::string& name, |
+ const mojo::String& name, |
mojom::GenericInterfaceAssociatedRequest request) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
if (delegate_) |