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

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

Issue 1309103002: 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/channel_manager.h
diff --git a/third_party/mojo/src/mojo/edk/system/channel_manager.h b/third_party/mojo/src/mojo/edk/system/channel_manager.h
index 014c1b3a7836597cea55e8e22d4abb024d68dc43..9a9c0e8501f3b5dde0cc5b6eb67e76db74abced5 100644
--- a/third_party/mojo/src/mojo/edk/system/channel_manager.h
+++ b/third_party/mojo/src/mojo/edk/system/channel_manager.h
@@ -10,9 +10,9 @@
#include "base/callback_forward.h"
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "base/synchronization/lock.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/channel_id.h"
-#include "mojo/edk/system/mutex.h"
#include "mojo/public/cpp/system/macros.h"
namespace base {
@@ -135,15 +135,12 @@
const scoped_refptr<base::TaskRunner> io_thread_task_runner_;
ConnectionManager* const connection_manager_;
- // Note: |Channel| methods should not be called under |mutex_|.
- // TODO(vtl): Annotate the above rule using |MOJO_ACQUIRED_{BEFORE,AFTER}()|,
- // once clang actually checks such annotations.
- // https://github.com/domokit/mojo/issues/313
- mutable Mutex mutex_;
+ // Note: |Channel| methods should not be called under |lock_|.
+ mutable base::Lock lock_; // Protects the members below.
using ChannelIdToChannelMap =
base::hash_map<ChannelId, scoped_refptr<Channel>>;
- ChannelIdToChannelMap channels_ MOJO_GUARDED_BY(mutex_);
+ ChannelIdToChannelMap channels_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ChannelManager);
};
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/channel_endpoint.cc ('k') | third_party/mojo/src/mojo/edk/system/channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698