Commit 2f2f2948 authored by gab's avatar gab Committed by Commit bot

Migrate WaitableEvent to enum-based constructor in ppapi/nacl_irt

Changes made manually because clang-tidy doesn't interact well with cross-compile.

BUG=612843

Review-Url: https://codereview.chromium.org/2043893002
Cr-Commit-Position: refs/heads/master@{#398219}
parent 1b88e4a9
......@@ -34,9 +34,8 @@ class ManifestMessageFilter : public IPC::SyncMessageFilter {
ManifestMessageFilter(base::WaitableEvent* shutdown_event)
: SyncMessageFilter(shutdown_event,
false /* is_channel_send_thread_safe */),
connected_event_(
true /* manual_reset */, false /* initially_signaled */) {
}
connected_event_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED) {}
bool Send(IPC::Message* message) override {
// Wait until set up is actually done.
......
......@@ -63,7 +63,9 @@ void StartUpPlugin() {
DCHECK(!g_shutdown_event);
DCHECK(!g_io_thread);
g_shutdown_event = new base::WaitableEvent(true, false);
g_shutdown_event =
new base::WaitableEvent(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED);
g_io_thread = new base::Thread("Chrome_NaClIOThread");
g_io_thread->StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
......@@ -75,7 +77,8 @@ void StartUpPlugin() {
// TODO(hidehiko,dmichael): This works, but is probably not well designed
// usage. Once a better approach is made, replace this by that way.
// (crbug.com/364241).
base::WaitableEvent event(true, false);
base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED);
g_io_thread->task_runner()->PostTask(
FROM_HERE, base::Bind(StartUpManifestServiceOnIOThread, &event));
event.Wait();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment