Index: third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h |
diff --git a/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h b/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h |
index c2347d56435076320803dd71831a610d27caab85..bb812f01956e1bef2e498df5057e6a8eca21b7ec 100644 |
--- a/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h |
+++ b/third_party/mojo/src/mojo/edk/system/test_channel_endpoint_client.h |
@@ -7,10 +7,10 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/synchronization/lock.h" |
#include "mojo/edk/system/channel_endpoint.h" |
#include "mojo/edk/system/channel_endpoint_client.h" |
#include "mojo/edk/system/message_in_transit_queue.h" |
+#include "mojo/edk/system/mutex.h" |
#include "mojo/public/cpp/system/macros.h" |
namespace base { |
@@ -49,15 +49,15 @@ class TestChannelEndpointClient final : public ChannelEndpointClient { |
private: |
~TestChannelEndpointClient() override; |
- mutable base::Lock lock_; // Protects the members below. |
+ mutable Mutex mutex_; |
- unsigned port_; |
- scoped_refptr<ChannelEndpoint> endpoint_; |
+ unsigned port_ MOJO_GUARDED_BY(mutex_); |
+ scoped_refptr<ChannelEndpoint> endpoint_ MOJO_GUARDED_BY(mutex_); |
- MessageInTransitQueue messages_; |
+ MessageInTransitQueue messages_ MOJO_GUARDED_BY(mutex_); |
// Event to trigger if we read a message (may be null). |
- base::WaitableEvent* read_event_; |
+ base::WaitableEvent* read_event_ MOJO_GUARDED_BY(mutex_); |
MOJO_DISALLOW_COPY_AND_ASSIGN(TestChannelEndpointClient); |
}; |