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

Unified Diff: base/threading/thread_perftest.cc

Issue 2032603002: Migrate WaitableEvent to enum-based constructor in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: undo incorrect template change Created 4 years, 7 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
« no previous file with comments | « base/threading/thread_local_unittest.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_perftest.cc
diff --git a/base/threading/thread_perftest.cc b/base/threading/thread_perftest.cc
index 5958f1aa6de792f6d8c32c0246504a93446793b0..2071889848469d73eb303cfe119943e808c39555 100644
--- a/base/threading/thread_perftest.cc
+++ b/base/threading/thread_perftest.cc
@@ -35,7 +35,8 @@ const int kNumRuns = 100000;
class ThreadPerfTest : public testing::Test {
public:
ThreadPerfTest()
- : done_(false, false) {
+ : done_(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED) {
// Disable the task profiler as it adds significant cost!
CommandLine::Init(0, NULL);
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
@@ -59,7 +60,8 @@ class ThreadPerfTest : public testing::Test {
}
base::ThreadTicks ThreadNow(base::Thread* thread) {
- base::WaitableEvent done(false, false);
+ base::WaitableEvent done(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED);
base::ThreadTicks ticks;
thread->task_runner()->PostTask(
FROM_HERE, base::Bind(&ThreadPerfTest::TimeOnThread,
« no previous file with comments | « base/threading/thread_local_unittest.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698