summaryrefslogtreecommitdiffstats
path: root/mojo/public
diff options
context:
space:
mode:
authoryzshen <yzshen@chromium.org>2016-03-09 16:39:38 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-10 00:40:48 +0000
commit428d9b4fb3ee8d9831238358a93ea6a3e9ad28f1 (patch)
tree70e8d889a4af485e80cb4fd5ee762c2bf70b366c /mojo/public
parent85953dcfa85e670b776e8389845a640ef6bb8fa4 (diff)
downloadchromium_src-428d9b4fb3ee8d9831238358a93ea6a3e9ad28f1.zip
chromium_src-428d9b4fb3ee8d9831238358a93ea6a3e9ad28f1.tar.gz
chromium_src-428d9b4fb3ee8d9831238358a93ea6a3e9ad28f1.tar.bz2
mojo_public_system_perftests: replace mojo::Thread with base::SimpleThread.
This is a preparation of removing the mojo/public/cpp/utility folder. BUG=570102 Review URL: https://codereview.chromium.org/1779993002 Cr-Commit-Position: refs/heads/master@{#380273}
Diffstat (limited to 'mojo/public')
-rw-r--r--mojo/public/c/system/tests/BUILD.gn1
-rw-r--r--mojo/public/c/system/tests/core_perftest.cc16
2 files changed, 10 insertions, 7 deletions
diff --git a/mojo/public/c/system/tests/BUILD.gn b/mojo/public/c/system/tests/BUILD.gn
index 5d852ad..0dd7052 100644
--- a/mojo/public/c/system/tests/BUILD.gn
+++ b/mojo/public/c/system/tests/BUILD.gn
@@ -32,7 +32,6 @@ source_set("perftests") {
deps = [
"//mojo/public/cpp/system",
"//mojo/public/cpp/test_support:test_utils",
- "//mojo/public/cpp/utility",
"//testing/gtest",
]
}
diff --git a/mojo/public/c/system/tests/core_perftest.cc b/mojo/public/c/system/tests/core_perftest.cc
index dc5566e..80734d30 100644
--- a/mojo/public/c/system/tests/core_perftest.cc
+++ b/mojo/public/c/system/tests/core_perftest.cc
@@ -10,24 +10,26 @@
#include <stdint.h>
#include <stdio.h>
+#include "base/threading/simple_thread.h"
#include "mojo/public/cpp/system/macros.h"
#include "mojo/public/cpp/test_support/test_support.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-// TODO(vtl): (here and below) crbug.com/342893
#if !defined(WIN32)
#include <time.h>
-#include "mojo/public/cpp/utility/thread.h"
#endif // !defined(WIN32)
namespace {
#if !defined(WIN32)
-class MessagePipeWriterThread : public mojo::Thread {
+class MessagePipeWriterThread : public base::SimpleThread {
public:
MessagePipeWriterThread(MojoHandle handle, uint32_t num_bytes)
- : handle_(handle), num_bytes_(num_bytes), num_writes_(0) {}
+ : SimpleThread("MessagePipeWriterThread"),
+ handle_(handle),
+ num_bytes_(num_bytes),
+ num_writes_(0) {}
~MessagePipeWriterThread() override {}
void Run() override {
@@ -62,10 +64,12 @@ class MessagePipeWriterThread : public mojo::Thread {
DISALLOW_COPY_AND_ASSIGN(MessagePipeWriterThread);
};
-class MessagePipeReaderThread : public mojo::Thread {
+class MessagePipeReaderThread : public base::SimpleThread {
public:
explicit MessagePipeReaderThread(MojoHandle handle)
- : handle_(handle), num_reads_(0) {}
+ : SimpleThread("MessagePipeReaderThread"),
+ handle_(handle),
+ num_reads_(0) {}
~MessagePipeReaderThread() override {}
void Run() override {