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

Unified Diff: third_party/mojo/src/mojo/edk/system/endpoint_relayer.h

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/endpoint_relayer.h
diff --git a/third_party/mojo/src/mojo/edk/system/endpoint_relayer.h b/third_party/mojo/src/mojo/edk/system/endpoint_relayer.h
index cfeda2405ea19d309aaf0b8609c51e25e0c16bad..8b17a50b78c85343051f338c8821dfe6429d135c 100644
--- a/third_party/mojo/src/mojo/edk/system/endpoint_relayer.h
+++ b/third_party/mojo/src/mojo/edk/system/endpoint_relayer.h
@@ -7,8 +7,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/synchronization/lock.h"
#include "mojo/edk/system/channel_endpoint_client.h"
-#include "mojo/edk/system/mutex.h"
#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/cpp/system/macros.h"
@@ -68,8 +68,7 @@
static unsigned GetPeerPort(unsigned port);
// Initialize this object. This must be called before any other method.
- void Init(ChannelEndpoint* endpoint0,
- ChannelEndpoint* endpoint1) MOJO_NOT_THREAD_SAFE;
+ void Init(ChannelEndpoint* endpoint0, ChannelEndpoint* endpoint1);
// Sets (or resets) the filter, which can (optionally) handle/filter
// |Type::ENDPOINT_CLIENT| messages (see |Filter| above).
@@ -82,9 +81,11 @@
private:
~EndpointRelayer() override;
- Mutex mutex_;
- scoped_refptr<ChannelEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_);
- scoped_ptr<Filter> filter_ MOJO_GUARDED_BY(mutex_);
+ // TODO(vtl): We could probably get away without the lock if we had a
+ // thread-safe |scoped_refptr|.
+ base::Lock lock_; // Protects the following members.
+ scoped_refptr<ChannelEndpoint> endpoints_[2];
+ scoped_ptr<Filter> filter_;
MOJO_DISALLOW_COPY_AND_ASSIGN(EndpointRelayer);
};
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/dispatcher_unittest.cc ('k') | third_party/mojo/src/mojo/edk/system/endpoint_relayer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698