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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2026253003: Migrate WaitableEvent to enum-based constructor in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: 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: content/browser/gpu/browser_gpu_channel_host_factory.cc
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index a7687ee30faabf1ad049c8f1a487929af6cc145c..aff2083e6deff4b7e3fe02f0b11d17a907cee9c5 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -95,15 +95,15 @@ BrowserGpuChannelHostFactory::EstablishRequest::EstablishRequest(
int gpu_client_id,
uint64_t gpu_client_tracing_id,
int gpu_host_id)
- : event_(false, false),
+ : event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED),
cause_for_gpu_launch_(cause),
gpu_client_id_(gpu_client_id),
gpu_client_tracing_id_(gpu_client_tracing_id),
gpu_host_id_(gpu_host_id),
reused_gpu_process_(false),
finished_(false),
- main_task_runner_(base::ThreadTaskRunnerHandle::Get()) {
-}
+ main_task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
void BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() {
// TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed.
@@ -226,7 +226,9 @@ void BrowserGpuChannelHostFactory::Terminate() {
BrowserGpuChannelHostFactory::BrowserGpuChannelHostFactory()
: gpu_client_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()),
gpu_client_tracing_id_(ChildProcessHost::kBrowserTracingProcessId),
- shutdown_event_(new base::WaitableEvent(true, false)),
+ shutdown_event_(new base::WaitableEvent(
+ base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED)),
gpu_memory_buffer_manager_(
new BrowserGpuMemoryBufferManager(gpu_client_id_,
gpu_client_tracing_id_)),
« no previous file with comments | « content/browser/gamepad/gamepad_test_helpers.cc ('k') | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698