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

Unified Diff: base/memory/weak_ptr_unittest.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/files/file_path_watcher_unittest.cc ('k') | base/message_loop/message_loop_task_runner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr_unittest.cc
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index df6c24f8a8aaf09ad8a951436efe3bdfbfb352ab..2eb6d295780f4b43d18338c0c48a5b34e9364e6a 100644
--- a/base/memory/weak_ptr_unittest.cc
+++ b/base/memory/weak_ptr_unittest.cc
@@ -69,7 +69,8 @@ class BackgroundThread : public Thread {
~BackgroundThread() override { Stop(); }
void CreateArrowFromTarget(Arrow** arrow, Target* target) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE, base::Bind(&BackgroundThread::DoCreateArrowFromTarget, arrow,
target, &completion));
@@ -77,7 +78,8 @@ class BackgroundThread : public Thread {
}
void CreateArrowFromArrow(Arrow** arrow, const Arrow* other) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE, base::Bind(&BackgroundThread::DoCreateArrowFromArrow, arrow,
other, &completion));
@@ -85,7 +87,8 @@ class BackgroundThread : public Thread {
}
void DeleteTarget(Target* object) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE,
base::Bind(&BackgroundThread::DoDeleteTarget, object, &completion));
@@ -93,7 +96,8 @@ class BackgroundThread : public Thread {
}
void CopyAndAssignArrow(Arrow* object) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE, base::Bind(&BackgroundThread::DoCopyAndAssignArrow, object,
&completion));
@@ -101,7 +105,8 @@ class BackgroundThread : public Thread {
}
void CopyAndAssignArrowBase(Arrow* object) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE, base::Bind(&BackgroundThread::DoCopyAndAssignArrowBase,
object, &completion));
@@ -109,7 +114,8 @@ class BackgroundThread : public Thread {
}
void DeleteArrow(Arrow* object) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(
FROM_HERE,
base::Bind(&BackgroundThread::DoDeleteArrow, object, &completion));
@@ -117,7 +123,8 @@ class BackgroundThread : public Thread {
}
Target* DeRef(const Arrow* arrow) {
- WaitableEvent completion(true, false);
+ WaitableEvent completion(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
Target* result = nullptr;
task_runner()->PostTask(FROM_HERE, base::Bind(&BackgroundThread::DoDeRef,
arrow, &result, &completion));
« no previous file with comments | « base/files/file_path_watcher_unittest.cc ('k') | base/message_loop/message_loop_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698