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

Unified Diff: mojo/edk/system/test_channel_endpoint_client.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/test_channel_endpoint_client.h
diff --git a/mojo/edk/system/test_channel_endpoint_client.h b/mojo/edk/system/test_channel_endpoint_client.h
index c2347d56435076320803dd71831a610d27caab85..bb812f01956e1bef2e498df5057e6a8eca21b7ec 100644
--- a/mojo/edk/system/test_channel_endpoint_client.h
+++ b/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);
};

Powered by Google App Engine
This is Rietveld 408576698