Index: third_party/mojo/src/mojo/edk/system/incoming_endpoint.h |
diff --git a/third_party/mojo/src/mojo/edk/system/incoming_endpoint.h b/third_party/mojo/src/mojo/edk/system/incoming_endpoint.h |
index bf0acf34dfef0b530d1b2a85b961402d92afecfa..22bf0b9437079e276a1bcb7d935ed5777959130b 100644 |
--- a/third_party/mojo/src/mojo/edk/system/incoming_endpoint.h |
+++ b/third_party/mojo/src/mojo/edk/system/incoming_endpoint.h |
@@ -8,9 +8,9 @@ |
#include <stddef.h> |
#include "base/memory/ref_counted.h" |
+#include "base/synchronization/lock.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/edk/system/system_impl_export.h" |
#include "mojo/public/cpp/system/macros.h" |
@@ -32,7 +32,7 @@ |
IncomingEndpoint(); |
// Must be called before any other method. |
- scoped_refptr<ChannelEndpoint> Init() MOJO_NOT_THREAD_SAFE; |
+ scoped_refptr<ChannelEndpoint> Init(); |
scoped_refptr<MessagePipe> ConvertToMessagePipe(); |
scoped_refptr<DataPipe> ConvertToDataPipeProducer( |
@@ -52,9 +52,9 @@ |
private: |
~IncomingEndpoint() override; |
- Mutex mutex_; |
- scoped_refptr<ChannelEndpoint> endpoint_ MOJO_GUARDED_BY(mutex_); |
- MessageInTransitQueue message_queue_ MOJO_GUARDED_BY(mutex_); |
+ base::Lock lock_; // Protects the following members. |
+ scoped_refptr<ChannelEndpoint> endpoint_; |
+ MessageInTransitQueue message_queue_; |
MOJO_DISALLOW_COPY_AND_ASSIGN(IncomingEndpoint); |
}; |