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

Side by Side Diff: content/child/child_process.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, 6 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 unified diff | Download patch
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/fileapi/webfilesystem_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/child_process.h" 5 #include "content/child/child_process.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 20 matching lines...) Expand all
31 namespace { 31 namespace {
32 32
33 base::LazyInstance<base::ThreadLocalPointer<ChildProcess> > g_lazy_tls = 33 base::LazyInstance<base::ThreadLocalPointer<ChildProcess> > g_lazy_tls =
34 LAZY_INSTANCE_INITIALIZER; 34 LAZY_INSTANCE_INITIALIZER;
35 } 35 }
36 36
37 ChildProcess::ChildProcess() : ChildProcess(base::ThreadPriority::NORMAL) {} 37 ChildProcess::ChildProcess() : ChildProcess(base::ThreadPriority::NORMAL) {}
38 38
39 ChildProcess::ChildProcess(base::ThreadPriority io_thread_priority) 39 ChildProcess::ChildProcess(base::ThreadPriority io_thread_priority)
40 : ref_count_(0), 40 : ref_count_(0),
41 shutdown_event_(true, false), 41 shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL,
42 base::WaitableEvent::InitialState::NOT_SIGNALED),
42 io_thread_("Chrome_ChildIOThread") { 43 io_thread_("Chrome_ChildIOThread") {
43 DCHECK(!g_lazy_tls.Pointer()->Get()); 44 DCHECK(!g_lazy_tls.Pointer()->Get());
44 g_lazy_tls.Pointer()->Set(this); 45 g_lazy_tls.Pointer()->Set(this);
45 46
46 base::StatisticsRecorder::Initialize(); 47 base::StatisticsRecorder::Initialize();
47 48
48 // We can't recover from failing to start the IO thread. 49 // We can't recover from failing to start the IO thread.
49 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); 50 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
50 thread_options.priority = io_thread_priority; 51 thread_options.priority = io_thread_priority;
51 #if defined(OS_ANDROID) 52 #if defined(OS_ANDROID)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 memset(&sa, 0, sizeof(sa)); 144 memset(&sa, 0, sizeof(sa));
144 sa.sa_handler = SigUSR1Handler; 145 sa.sa_handler = SigUSR1Handler;
145 sigaction(SIGUSR1, &sa, NULL); 146 sigaction(SIGUSR1, &sa, NULL);
146 147
147 pause(); 148 pause();
148 #endif // defined(OS_ANDROID) 149 #endif // defined(OS_ANDROID)
149 #endif // defined(OS_POSIX) 150 #endif // defined(OS_POSIX)
150 } 151 }
151 152
152 } // namespace content 153 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/fileapi/webfilesystem_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698