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; |
} |