| Index: third_party/mojo/src/mojo/edk/system/raw_channel_unittest.cc
|
| diff --git a/third_party/mojo/src/mojo/edk/system/raw_channel_unittest.cc b/third_party/mojo/src/mojo/edk/system/raw_channel_unittest.cc
|
| index a9017915ac74b1499e5271a84b7f0ce3b98a1247..bc27889d30ed05864c2317be2c8d189ec466d954 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/raw_channel_unittest.cc
|
| +++ b/third_party/mojo/src/mojo/edk/system/raw_channel_unittest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/rand_util.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/test/test_io_thread.h"
|
| #include "base/threading/simple_thread.h"
|
| @@ -27,7 +28,6 @@
|
| #include "mojo/edk/embedder/platform_handle.h"
|
| #include "mojo/edk/embedder/scoped_platform_handle.h"
|
| #include "mojo/edk/system/message_in_transit.h"
|
| -#include "mojo/edk/system/mutex.h"
|
| #include "mojo/edk/system/test_utils.h"
|
| #include "mojo/edk/system/transport_data.h"
|
| #include "mojo/edk/test/test_utils.h"
|
| @@ -233,7 +233,7 @@
|
| size_t expected_size;
|
| bool should_signal = false;
|
| {
|
| - MutexLocker locker(&mutex_);
|
| + base::AutoLock locker(lock_);
|
| CHECK_LT(position_, expected_sizes_.size());
|
| position = position_;
|
| expected_size = expected_sizes_[position];
|
| @@ -261,7 +261,7 @@
|
| void Wait() { done_event_.Wait(); }
|
|
|
| void SetExpectedSizes(const std::vector<uint32_t>& expected_sizes) {
|
| - MutexLocker locker(&mutex_);
|
| + base::AutoLock locker(lock_);
|
| CHECK_EQ(position_, expected_sizes_.size());
|
| expected_sizes_ = expected_sizes;
|
| position_ = 0;
|
| @@ -270,9 +270,9 @@
|
| private:
|
| base::WaitableEvent done_event_;
|
|
|
| - Mutex mutex_;
|
| - std::vector<uint32_t> expected_sizes_ MOJO_GUARDED_BY(mutex_);
|
| - size_t position_ MOJO_GUARDED_BY(mutex_);
|
| + base::Lock lock_; // Protects the following members.
|
| + std::vector<uint32_t> expected_sizes_;
|
| + size_t position_;
|
|
|
| MOJO_DISALLOW_COPY_AND_ASSIGN(ReadCheckerRawChannelDelegate);
|
| };
|
|
|