Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Side by Side Diff: mojo/edk/system/raw_channel_unittest.cc

Issue 1351293002: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk (minus js). (Closed) Base URL: https://github.com/domokit/mojo.git@edk_unique_ptr_5
Patch Set: oops, forgot to fix android Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/system/raw_channel_posix.cc ('k') | mojo/edk/system/transport_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « mojo/edk/system/raw_channel_posix.cc ('k') | mojo/edk/system/transport_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698