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

Unified Diff: mojo/edk/system/incoming_endpoint.h

Issue 1234683002: Convert some more |base::Lock|s to |mojo::system::Mutex|s. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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: mojo/edk/system/incoming_endpoint.h
diff --git a/mojo/edk/system/incoming_endpoint.h b/mojo/edk/system/incoming_endpoint.h
index 22bf0b9437079e276a1bcb7d935ed5777959130b..85f9587a23aecec5df685422517294fa9b969344 100644
--- a/mojo/edk/system/incoming_endpoint.h
+++ b/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"
@@ -52,9 +52,9 @@ class MOJO_SYSTEM_IMPL_EXPORT IncomingEndpoint final
private:
~IncomingEndpoint() override;
- base::Lock lock_; // Protects the following members.
- scoped_refptr<ChannelEndpoint> endpoint_;
- MessageInTransitQueue message_queue_;
+ Mutex mutex_;
+ scoped_refptr<ChannelEndpoint> endpoint_ MOJO_GUARDED_BY(mutex_);
+ MessageInTransitQueue message_queue_ MOJO_GUARDED_BY(mutex_);
MOJO_DISALLOW_COPY_AND_ASSIGN(IncomingEndpoint);
};

Powered by Google App Engine
This is Rietveld 408576698