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

Unified Diff: third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc

Issue 1310103002: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc
diff --git a/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc b/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc
index 51d2a5806a6fc9589fbe2eeceb5b83fcca0a98f6..b3e69b11c8d5674f7541ac23cc66e512cd99cfdf 100644
--- a/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc
+++ b/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.cc
@@ -17,7 +17,7 @@ TestChannelEndpointClient::TestChannelEndpointClient()
}
void TestChannelEndpointClient::Init(unsigned port, ChannelEndpoint* endpoint) {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
ASSERT_EQ(0u, port_);
ASSERT_FALSE(endpoint_);
port_ = port;
@@ -25,30 +25,30 @@ void TestChannelEndpointClient::Init(unsigned port, ChannelEndpoint* endpoint) {
}
bool TestChannelEndpointClient::IsDetached() const {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
return !endpoint_;
}
size_t TestChannelEndpointClient::NumMessages() const {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
return messages_.Size();
}
scoped_ptr<MessageInTransit> TestChannelEndpointClient::PopMessage() {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
if (messages_.IsEmpty())
return nullptr;
return messages_.GetMessage();
}
void TestChannelEndpointClient::SetReadEvent(base::WaitableEvent* read_event) {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
read_event_ = read_event;
}
bool TestChannelEndpointClient::OnReadMessage(unsigned port,
MessageInTransit* message) {
- base::AutoLock locker(lock_);
+ MutexLocker locker(&mutex_);
EXPECT_EQ(port_, port);
EXPECT_TRUE(endpoint_);
@@ -61,9 +61,9 @@ bool TestChannelEndpointClient::OnReadMessage(unsigned port,
}
void TestChannelEndpointClient::OnDetachFromChannel(unsigned port) {
- EXPECT_EQ(port_, port);
+ MutexLocker locker(&mutex_);
- base::AutoLock locker(lock_);
+ EXPECT_EQ(port_, port);
ASSERT_TRUE(endpoint_);
endpoint_->DetachFromClient();
endpoint_ = nullptr;
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h ('k') | third_party/mojo/src/mojo/edk/system/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698