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

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

Issue 1350503005: EDK: Some more scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/channel_test_base.h ('k') | mojo/edk/system/data_pipe_impl_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/channel_test_base.h" 5 #include "mojo/edk/system/channel_test_base.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
9 #include "mojo/edk/embedder/platform_channel_pair.h" 11 #include "mojo/edk/embedder/platform_channel_pair.h"
10 #include "mojo/edk/system/raw_channel.h" 12 #include "mojo/edk/system/raw_channel.h"
11 13
12 namespace mojo { 14 namespace mojo {
13 namespace system { 15 namespace system {
14 namespace test { 16 namespace test {
15 17
16 ChannelTestBase::ChannelTestBase() 18 ChannelTestBase::ChannelTestBase()
(...skipping 11 matching lines...) Expand all
28 30
29 CHECK(!channels_[i]); 31 CHECK(!channels_[i]);
30 channels_[i] = new Channel(&platform_support_); 32 channels_[i] = new Channel(&platform_support_);
31 } 33 }
32 34
33 void ChannelTestBase::InitChannelOnIOThread(unsigned i) { 35 void ChannelTestBase::InitChannelOnIOThread(unsigned i) {
34 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 36 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
35 37
36 CHECK(raw_channels_[i]); 38 CHECK(raw_channels_[i]);
37 CHECK(channels_[i]); 39 CHECK(channels_[i]);
38 channels_[i]->Init(raw_channels_[i].Pass()); 40 channels_[i]->Init(std::move(raw_channels_[i]));
39 } 41 }
40 42
41 void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) { 43 void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) {
42 CreateChannelOnIOThread(i); 44 CreateChannelOnIOThread(i);
43 InitChannelOnIOThread(i); 45 InitChannelOnIOThread(i);
44 } 46 }
45 47
46 void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) { 48 void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) {
47 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 49 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
48 50
(...skipping 10 matching lines...) Expand all
59 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop()); 61 CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
60 62
61 embedder::PlatformChannelPair channel_pair; 63 embedder::PlatformChannelPair channel_pair;
62 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle()); 64 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle());
63 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle()); 65 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle());
64 } 66 }
65 67
66 } // namespace test 68 } // namespace test
67 } // namespace system 69 } // namespace system
68 } // namespace mojo 70 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_test_base.h ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698