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/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 RenderSandboxHostLinux::GetInstance()->Init(); | 222 RenderSandboxHostLinux::GetInstance()->Init(); |
223 | 223 |
224 if (parsed_command_line.HasSwitch(switches::kNoZygote)) { | 224 if (parsed_command_line.HasSwitch(switches::kNoZygote)) { |
225 CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox)) | 225 CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox)) |
226 << "--no-sandbox should be used together with --no--zygote"; | 226 << "--no-sandbox should be used together with --no--zygote"; |
227 return; | 227 return; |
228 } | 228 } |
229 | 229 |
230 // Tickle the zygote host so it forks now. | 230 // Tickle the zygote host so it forks now. |
231 ZygoteHostImpl::GetInstance()->Init(parsed_command_line); | 231 ZygoteHostImpl::GetInstance()->Init(parsed_command_line); |
232 *GetGenericZygote() = CreateZygote(); | 232 ZygoteHandle generic_zygote = CreateGenericZygote(); |
233 // TODO(kerrnel): Investigate doing this without the ZygoteHostImpl as a | 233 // TODO(kerrnel): Investigate doing this without the ZygoteHostImpl as a |
234 // proxy. It is currently done this way due to concerns about race | 234 // proxy. It is currently done this way due to concerns about race |
235 // conditions. | 235 // conditions. |
236 ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus( | 236 ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus( |
237 (*GetGenericZygote())->GetSandboxStatus()); | 237 generic_zygote->GetSandboxStatus()); |
238 } | 238 } |
239 #endif | 239 #endif |
240 | 240 |
241 #if defined(USE_GLIB) | 241 #if defined(USE_GLIB) |
242 static void GLibLogHandler(const gchar* log_domain, | 242 static void GLibLogHandler(const gchar* log_domain, |
243 GLogLevelFlags log_level, | 243 GLogLevelFlags log_level, |
244 const gchar* message, | 244 const gchar* message, |
245 gpointer userdata) { | 245 gpointer userdata) { |
246 if (!log_domain) | 246 if (!log_domain) |
247 log_domain = "<unknown>"; | 247 log_domain = "<unknown>"; |
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1761 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
1762 MediaInternals::GetInstance()); | 1762 MediaInternals::GetInstance()); |
1763 } | 1763 } |
1764 CHECK(audio_manager_); | 1764 CHECK(audio_manager_); |
1765 | 1765 |
1766 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1766 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
1767 CHECK(audio_system_); | 1767 CHECK(audio_system_); |
1768 } | 1768 } |
1769 | 1769 |
1770 } // namespace content | 1770 } // namespace content |
OLD | NEW |