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

Side by Side Diff: content/child/child_process.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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
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/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 13 matching lines...) Expand all
24 #endif 24 #endif
25 25
26 #if defined(OS_POSIX) && !defined(OS_ANDROID) 26 #if defined(OS_POSIX) && !defined(OS_ANDROID)
27 #include <signal.h> 27 #include <signal.h>
28 static void SigUSR1Handler(int signal) { } 28 static void SigUSR1Handler(int signal) { }
29 #endif 29 #endif
30 30
31 namespace content { 31 namespace content {
32 32
33 namespace { 33 namespace {
34 34 base::LazyInstance<base::ThreadLocalPointer<ChildProcess>>::DestructorAtExit
35 base::LazyInstance<base::ThreadLocalPointer<ChildProcess> > g_lazy_tls = 35 g_lazy_tls = LAZY_INSTANCE_INITIALIZER;
36 LAZY_INSTANCE_INITIALIZER;
37 } 36 }
38 37
39 ChildProcess::ChildProcess( 38 ChildProcess::ChildProcess(
40 base::ThreadPriority io_thread_priority, 39 base::ThreadPriority io_thread_priority,
41 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params, 40 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params,
42 base::TaskScheduler::WorkerPoolIndexForTraitsCallback 41 base::TaskScheduler::WorkerPoolIndexForTraitsCallback
43 worker_pool_index_for_traits_callback) 42 worker_pool_index_for_traits_callback)
44 : ref_count_(0), 43 : ref_count_(0),
45 shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL, 44 shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL,
46 base::WaitableEvent::InitialState::NOT_SIGNALED), 45 base::WaitableEvent::InitialState::NOT_SIGNALED),
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 memset(&sa, 0, sizeof(sa)); 181 memset(&sa, 0, sizeof(sa));
183 sa.sa_handler = SigUSR1Handler; 182 sa.sa_handler = SigUSR1Handler;
184 sigaction(SIGUSR1, &sa, NULL); 183 sigaction(SIGUSR1, &sa, NULL);
185 184
186 pause(); 185 pause();
187 #endif // defined(OS_ANDROID) 186 #endif // defined(OS_ANDROID)
188 #endif // defined(OS_POSIX) 187 #endif // defined(OS_POSIX)
189 } 188 }
190 189
191 } // namespace content 190 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698