Chromium Code Reviews

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

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « mojo/edk/system/test_channel_endpoint_client.h ('k') | mojo/edk/system/thread_annotations.h » ('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/test_channel_endpoint_client.h" 5 #include "mojo/edk/system/test_channel_endpoint_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/edk/system/message_in_transit.h" 9 #include "mojo/edk/system/message_in_transit.h"
10 #include "mojo/edk/system/waitable_event.h" 10 #include "mojo/edk/system/waitable_event.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using mojo::util::MutexLocker;
13 using mojo::util::RefPtr; 14 using mojo::util::RefPtr;
14 15
15 namespace mojo { 16 namespace mojo {
16 namespace system { 17 namespace system {
17 namespace test { 18 namespace test {
18 19
19 void TestChannelEndpointClient::Init(unsigned port, 20 void TestChannelEndpointClient::Init(unsigned port,
20 RefPtr<ChannelEndpoint>&& endpoint) { 21 RefPtr<ChannelEndpoint>&& endpoint) {
21 MutexLocker locker(&mutex_); 22 MutexLocker locker(&mutex_);
22 ASSERT_EQ(0u, port_); 23 ASSERT_EQ(0u, port_);
(...skipping 51 matching lines...)
74 TestChannelEndpointClient::TestChannelEndpointClient() 75 TestChannelEndpointClient::TestChannelEndpointClient()
75 : port_(0), read_event_(nullptr) {} 76 : port_(0), read_event_(nullptr) {}
76 77
77 TestChannelEndpointClient::~TestChannelEndpointClient() { 78 TestChannelEndpointClient::~TestChannelEndpointClient() {
78 EXPECT_FALSE(endpoint_); 79 EXPECT_FALSE(endpoint_);
79 } 80 }
80 81
81 } // namespace test 82 } // namespace test
82 } // namespace system 83 } // namespace system
83 } // namespace mojo 84 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/test_channel_endpoint_client.h ('k') | mojo/edk/system/thread_annotations.h » ('j') | no next file with comments »

Powered by Google App Engine