OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 base::StatisticsRecorder::Initialize(); | 50 base::StatisticsRecorder::Initialize(); |
51 | 51 |
52 // Initialize TaskScheduler if not already done. A TaskScheduler may already | 52 // Initialize TaskScheduler if not already done. A TaskScheduler may already |
53 // exist when ChildProcess is instantiated in the browser process or in a | 53 // exist when ChildProcess is instantiated in the browser process or in a |
54 // test process. | 54 // test process. |
55 if (!base::TaskScheduler::GetInstance()) { | 55 if (!base::TaskScheduler::GetInstance()) { |
56 if (task_scheduler_init_params) { | 56 if (task_scheduler_init_params) { |
57 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( | 57 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( |
58 task_scheduler_name, *task_scheduler_init_params.get()); | 58 task_scheduler_name, *task_scheduler_init_params.get()); |
59 } else { | 59 } else { |
60 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(task_scheduler_name); | 60 base::TaskScheduler::CreateAndStartWithDefaultParams(task_scheduler_name); |
61 } | 61 } |
62 | 62 |
63 DCHECK(base::TaskScheduler::GetInstance()); | 63 DCHECK(base::TaskScheduler::GetInstance()); |
64 initialized_task_scheduler_ = true; | 64 initialized_task_scheduler_ = true; |
65 } | 65 } |
66 | 66 |
67 // We can't recover from failing to start the IO thread. | 67 // We can't recover from failing to start the IO thread. |
68 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); | 68 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); |
69 thread_options.priority = io_thread_priority; | 69 thread_options.priority = io_thread_priority; |
70 #if defined(OS_ANDROID) | 70 #if defined(OS_ANDROID) |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 memset(&sa, 0, sizeof(sa)); | 178 memset(&sa, 0, sizeof(sa)); |
179 sa.sa_handler = SigUSR1Handler; | 179 sa.sa_handler = SigUSR1Handler; |
180 sigaction(SIGUSR1, &sa, NULL); | 180 sigaction(SIGUSR1, &sa, NULL); |
181 | 181 |
182 pause(); | 182 pause(); |
183 #endif // defined(OS_ANDROID) | 183 #endif // defined(OS_ANDROID) |
184 #endif // defined(OS_POSIX) | 184 #endif // defined(OS_POSIX) |
185 } | 185 } |
186 | 186 |
187 } // namespace content | 187 } // namespace content |
OLD | NEW |