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

Unified Diff: mojo/edk/embedder/embedder_unittest.cc

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 years, 1 month 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
« no previous file with comments | « mojo/edk/embedder/BUILD.gn ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder_unittest.cc
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc
index b12f69d7aec4889960da8dace0c63f1a7585744f..86c46e0d32401653b21605ac5c7fbf95c91cc285 100644
--- a/mojo/edk/embedder/embedder_unittest.cc
+++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -14,12 +14,13 @@
#include "base/message_loop/message_loop.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/test_embedder.h"
-#include "mojo/edk/system/mutex.h"
#include "mojo/edk/system/test/test_io_thread.h"
#include "mojo/edk/system/test/timeouts.h"
#include "mojo/edk/system/waitable_event.h"
#include "mojo/edk/test/multiprocess_test_helper.h"
#include "mojo/edk/test/scoped_ipc_support.h"
+#include "mojo/edk/util/mutex.h"
+#include "mojo/edk/util/thread_annotations.h"
#include "mojo/public/c/system/core.h"
#include "mojo/public/cpp/system/handle.h"
#include "mojo/public/cpp/system/macros.h"
@@ -27,6 +28,8 @@
#include "testing/gtest/include/gtest/gtest.h"
using mojo::system::test::TestIOThread;
+using mojo::util::Mutex;
+using mojo::util::MutexLocker;
namespace mojo {
namespace embedder {
@@ -196,7 +199,7 @@ class TestAsyncWaiter {
TestAsyncWaiter() : wait_result_(MOJO_RESULT_UNKNOWN) {}
void Awake(MojoResult result) {
- system::MutexLocker l(&wait_result_mutex_);
+ MutexLocker l(&wait_result_mutex_);
wait_result_ = result;
event_.Signal();
}
@@ -206,14 +209,14 @@ class TestAsyncWaiter {
}
MojoResult wait_result() const {
- system::MutexLocker l(&wait_result_mutex_);
+ MutexLocker l(&wait_result_mutex_);
return wait_result_;
}
private:
mojo::system::ManualResetWaitableEvent event_;
- mutable system::Mutex wait_result_mutex_;
+ mutable Mutex wait_result_mutex_;
MojoResult wait_result_ MOJO_GUARDED_BY(wait_result_mutex_);
MOJO_DISALLOW_COPY_AND_ASSIGN(TestAsyncWaiter);
« no previous file with comments | « mojo/edk/embedder/BUILD.gn ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698