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

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

Issue 1311613002: Revert of 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 b3e69b11c8d5674f7541ac23cc66e512cd99cfdf..51d2a5806a6fc9589fbe2eeceb5b83fcca0a98f6 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 @@
}
void TestChannelEndpointClient::Init(unsigned port, ChannelEndpoint* endpoint) {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
ASSERT_EQ(0u, port_);
ASSERT_FALSE(endpoint_);
port_ = port;
@@ -25,30 +25,30 @@
}
bool TestChannelEndpointClient::IsDetached() const {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
return !endpoint_;
}
size_t TestChannelEndpointClient::NumMessages() const {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
return messages_.Size();
}
scoped_ptr<MessageInTransit> TestChannelEndpointClient::PopMessage() {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
if (messages_.IsEmpty())
return nullptr;
return messages_.GetMessage();
}
void TestChannelEndpointClient::SetReadEvent(base::WaitableEvent* read_event) {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
read_event_ = read_event;
}
bool TestChannelEndpointClient::OnReadMessage(unsigned port,
MessageInTransit* message) {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
EXPECT_EQ(port_, port);
EXPECT_TRUE(endpoint_);
@@ -61,9 +61,9 @@
}
void TestChannelEndpointClient::OnDetachFromChannel(unsigned port) {
- MutexLocker locker(&mutex_);
+ EXPECT_EQ(port_, port);
- EXPECT_EQ(port_, port);
+ base::AutoLock locker(lock_);
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