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

Unified Diff: components/scheduler/child/webthread_impl_for_worker_scheduler.cc

Issue 2028193002: Migrate WaitableEvent to enum-based constructor in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: rm comment explaining true/false 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
Index: components/scheduler/child/webthread_impl_for_worker_scheduler.cc
diff --git a/components/scheduler/child/webthread_impl_for_worker_scheduler.cc b/components/scheduler/child/webthread_impl_for_worker_scheduler.cc
index 2ffa68e6491d815960c49882c15a6773f40831bb..ff7ec336f000ab9190110b28d92959c34a35a4b1 100644
--- a/components/scheduler/child/webthread_impl_for_worker_scheduler.cc
+++ b/components/scheduler/child/webthread_impl_for_worker_scheduler.cc
@@ -33,7 +33,9 @@ WebThreadImplForWorkerScheduler::WebThreadImplForWorkerScheduler(
}
void WebThreadImplForWorkerScheduler::Init() {
- base::WaitableEvent completion(false, false);
+ base::WaitableEvent completion(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
thread_task_runner_->PostTask(
FROM_HERE, base::Bind(&WebThreadImplForWorkerScheduler::InitOnThread,
base::Unretained(this), &completion));
@@ -42,7 +44,9 @@ void WebThreadImplForWorkerScheduler::Init() {
WebThreadImplForWorkerScheduler::~WebThreadImplForWorkerScheduler() {
if (task_runner_delegate_) {
- base::WaitableEvent completion(false, false);
+ base::WaitableEvent completion(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
// Restore the original task runner so that the thread can tear itself down.
thread_task_runner_->PostTask(
FROM_HERE,
« no previous file with comments | « components/prefs/pref_member_unittest.cc ('k') | components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698