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

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

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/channel_manager.cc
diff --git a/third_party/mojo/src/mojo/edk/system/channel_manager.cc b/third_party/mojo/src/mojo/edk/system/channel_manager.cc
index a2e4bf9768c524c6ddf60e7d3bbc3531d1195737..711b4daadc1334cb68859dfb8beb2c7f55ef4c2d 100644
--- a/third_party/mojo/src/mojo/edk/system/channel_manager.cc
+++ b/third_party/mojo/src/mojo/edk/system/channel_manager.cc
@@ -57,7 +57,7 @@
// consistency.
ChannelIdToChannelMap channels;
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
channels.swap(channels_);
}
@@ -110,7 +110,7 @@
}
scoped_refptr<Channel> ChannelManager::GetChannel(ChannelId channel_id) const {
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
auto it = channels_.find(channel_id);
DCHECK(it != channels_.end());
return it->second;
@@ -123,7 +123,7 @@
void ChannelManager::ShutdownChannelOnIOThread(ChannelId channel_id) {
scoped_refptr<Channel> channel;
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
auto it = channels_.find(channel_id);
DCHECK(it != channels_.end());
channel.swap(it->second);
@@ -138,7 +138,7 @@
scoped_refptr<base::TaskRunner> callback_thread_task_runner) {
scoped_refptr<Channel> channel;
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
auto it = channels_.find(channel_id);
DCHECK(it != channels_.end());
channel.swap(it->second);
@@ -178,7 +178,7 @@
channel->SetBootstrapEndpoint(bootstrap_channel_endpoint);
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
CHECK(channels_.find(channel_id) == channels_.end());
channels_[channel_id] = channel;
}
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/channel_manager.h ('k') | third_party/mojo/src/mojo/edk/system/connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698