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

Unified Diff: chrome/test/base/mojo_test_connector.cc

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc 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: chrome/test/base/mojo_test_connector.cc
diff --git a/chrome/test/base/mojo_test_connector.cc b/chrome/test/base/mojo_test_connector.cc
index 14feb6f0a8b30c6d840c58b94f0f6ed0aeed0dff..2a792a31ec9c96034cc984006f366e7078829767 100644
--- a/chrome/test/base/mojo_test_connector.cc
+++ b/chrome/test/base/mojo_test_connector.cc
@@ -165,7 +165,8 @@ class MojoTestState : public content::TestState {
void Init(base::CommandLine* command_line,
base::TestLauncher::LaunchOptions* test_launch_options) {
- base::WaitableEvent signal(true, false);
+ base::WaitableEvent signal(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
background_shell_->ExecuteOnShellThread(base::Bind(
&MojoTestState::BindOnBackgroundThread, base::Unretained(this), &signal,
command_line, test_launch_options));
@@ -180,7 +181,8 @@ class MojoTestState : public content::TestState {
// is only called on the background thread, and we wait for
// ChildProcessLaunchedOnBackgroundThread() to be run before continuing so
// that |handle| is still valid.
- base::WaitableEvent signal(true, false);
+ base::WaitableEvent signal(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
background_shell_->ExecuteOnShellThread(
base::Bind(&MojoTestState::ChildProcessLaunchedOnBackgroundThread,
base::Unretained(this), handle, pid, &signal));

Powered by Google App Engine
This is Rietveld 408576698