| Index: mojo/edk/system/transport_data.cc
|
| diff --git a/mojo/edk/system/transport_data.cc b/mojo/edk/system/transport_data.cc
|
| index fedfce60cf1eba1772fb71f884677de806a2677c..058d795af6fdca86ddf96d56d3e5ee630b3cd488 100644
|
| --- a/mojo/edk/system/transport_data.cc
|
| +++ b/mojo/edk/system/transport_data.cc
|
| @@ -19,6 +19,22 @@ using mojo::platform::ScopedPlatformHandle;
|
| namespace mojo {
|
| namespace system {
|
|
|
| +namespace {
|
| +
|
| +// TODO(vtl): Temporary, until |TransportData| really supports handles.
|
| +std::unique_ptr<DispatcherVector> DispatcherVectorFromHandleVector(
|
| + std::unique_ptr<HandleVector> handles) {
|
| + DCHECK(handles);
|
| +
|
| + std::unique_ptr<DispatcherVector> dispatchers(new DispatcherVector());
|
| + dispatchers->reserve(handles->size());
|
| + for (size_t i = 0; i < handles->size(); i++)
|
| + dispatchers->push_back(std::move(handles->at(i).dispatcher));
|
| + return dispatchers;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| // The maximum amount of space needed per platform handle.
|
| // (|{Channel,RawChannel}::GetSerializedPlatformHandleSize()| should always
|
| // return a value which is at most this. This is only used to calculate
|
| @@ -63,6 +79,12 @@ struct TransportData::PrivateStructForCompileAsserts {
|
| "alignment");
|
| };
|
|
|
| +// TODO(vtl): Make this the real one.
|
| +TransportData::TransportData(std::unique_ptr<HandleVector> handles,
|
| + Channel* channel)
|
| + : TransportData(DispatcherVectorFromHandleVector(std::move(handles)),
|
| + channel) {}
|
| +
|
| TransportData::TransportData(std::unique_ptr<DispatcherVector> dispatchers,
|
| Channel* channel)
|
| : buffer_size_() {
|
|
|