| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/system/raw_channel.h" | 5 #include "mojo/edk/system/raw_channel.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 platform_handles->push_back( | 820 platform_handles->push_back( |
| 821 mojo::test::PlatformHandleFromFILE(fp1.Pass()).release()); | 821 mojo::test::PlatformHandleFromFILE(fp1.Pass()).release()); |
| 822 platform_handles->push_back( | 822 platform_handles->push_back( |
| 823 mojo::test::PlatformHandleFromFILE(fp2.Pass()).release()); | 823 mojo::test::PlatformHandleFromFILE(fp2.Pass()).release()); |
| 824 | 824 |
| 825 std::unique_ptr<MessageInTransit> message( | 825 std::unique_ptr<MessageInTransit> message( |
| 826 new MessageInTransit(MessageInTransit::Type::ENDPOINT_CLIENT, | 826 new MessageInTransit(MessageInTransit::Type::ENDPOINT_CLIENT, |
| 827 MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA, | 827 MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA, |
| 828 sizeof(kHello), kHello)); | 828 sizeof(kHello), kHello)); |
| 829 message->SetTransportData(util::MakeUnique<TransportData>( | 829 message->SetTransportData(util::MakeUnique<TransportData>( |
| 830 platform_handles.Pass(), rc_write->GetSerializedPlatformHandleSize())); | 830 std::move(platform_handles), |
| 831 rc_write->GetSerializedPlatformHandleSize())); |
| 831 EXPECT_TRUE(rc_write->WriteMessage(std::move(message))); | 832 EXPECT_TRUE(rc_write->WriteMessage(std::move(message))); |
| 832 } | 833 } |
| 833 | 834 |
| 834 read_delegate.Wait(); | 835 read_delegate.Wait(); |
| 835 | 836 |
| 836 io_thread()->PostTaskAndWait( | 837 io_thread()->PostTaskAndWait( |
| 837 FROM_HERE, | 838 FROM_HERE, |
| 838 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read.get()))); | 839 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read.get()))); |
| 839 io_thread()->PostTaskAndWait( | 840 io_thread()->PostTaskAndWait( |
| 840 FROM_HERE, | 841 FROM_HERE, |
| 841 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write.get()))); | 842 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write.get()))); |
| 842 } | 843 } |
| 843 | 844 |
| 844 } // namespace | 845 } // namespace |
| 845 } // namespace system | 846 } // namespace system |
| 846 } // namespace mojo | 847 } // namespace mojo |
| OLD | NEW |