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

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

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/waiter_unittest.cc
diff --git a/third_party/mojo/src/mojo/edk/system/waiter_unittest.cc b/third_party/mojo/src/mojo/edk/system/waiter_unittest.cc
index 29bd5bcd48a4fc4d1188baf2ad4537483f313a94..68f81062e8174931259cf8e83cb094b921eac3d2 100644
--- a/third_party/mojo/src/mojo/edk/system/waiter_unittest.cc
+++ b/third_party/mojo/src/mojo/edk/system/waiter_unittest.cc
@@ -11,8 +11,8 @@
#include <stdint.h>
+#include "base/synchronization/lock.h"
#include "base/threading/simple_thread.h"
-#include "mojo/edk/system/mutex.h"
#include "mojo/edk/system/test_utils.h"
#include "mojo/public/cpp/system/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -41,7 +41,7 @@
MojoDeadline* elapsed) {
for (;;) {
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
if (done_) {
*result = result_;
*context = context_;
@@ -68,7 +68,7 @@
elapsed = stopwatch.Elapsed();
{
- MutexLocker locker(&mutex_);
+ base::AutoLock locker(lock_);
done_ = true;
result_ = result;
context_ = context;
@@ -79,11 +79,11 @@
const MojoDeadline deadline_;
Waiter waiter_; // Thread-safe.
- Mutex mutex_;
- bool done_ MOJO_GUARDED_BY(mutex_);
- MojoResult result_ MOJO_GUARDED_BY(mutex_);
- uint32_t context_ MOJO_GUARDED_BY(mutex_);
- MojoDeadline elapsed_ MOJO_GUARDED_BY(mutex_);
+ base::Lock lock_; // Protects the following members.
+ bool done_;
+ MojoResult result_;
+ uint32_t context_;
+ MojoDeadline elapsed_;
MOJO_DISALLOW_COPY_AND_ASSIGN(WaitingThread);
};
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/thread_annotations_unittest.cc ('k') | third_party/mojo/src/mojo/edk/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698