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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 13814027: Linux: make current InitializeSandbox() private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove sandbox_init_linux.cc Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/content_common.gypi ('k') | content/ppapi_plugin/ppapi_plugin_main.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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/threading/platform_thread.h" 16 #include "base/threading/platform_thread.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/common/gpu/gpu_config.h" 18 #include "content/common/gpu/gpu_config.h"
19 #include "content/common/sandbox_linux.h"
19 #include "content/gpu/gpu_child_thread.h" 20 #include "content/gpu/gpu_child_thread.h"
20 #include "content/gpu/gpu_info_collector.h" 21 #include "content/gpu/gpu_info_collector.h"
21 #include "content/gpu/gpu_process.h" 22 #include "content/gpu/gpu_process.h"
22 #include "content/gpu/gpu_watchdog_thread.h" 23 #include "content/gpu/gpu_watchdog_thread.h"
23 #include "content/public/common/content_client.h" 24 #include "content/public/common/content_client.h"
24 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
25 #include "content/public/common/gpu_switching_option.h" 26 #include "content/public/common/gpu_switching_option.h"
26 #include "content/public/common/main_function_params.h" 27 #include "content/public/common/main_function_params.h"
27 #include "crypto/hmac.h" 28 #include "crypto/hmac.h"
28 #include "ui/gl/gl_implementation.h" 29 #include "ui/gl/gl_implementation.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 227
227 #if defined(OS_CHROMEOS) && defined(NDEBUG) 228 #if defined(OS_CHROMEOS) && defined(NDEBUG)
228 // On Chrome OS and when not on a debug build, initialize 229 // On Chrome OS and when not on a debug build, initialize
229 // the GPU process' sandbox only for Intel GPUs. 230 // the GPU process' sandbox only for Intel GPUs.
230 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU. 231 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU.
231 #endif 232 #endif
232 233
233 if (do_init_sandbox) { 234 if (do_init_sandbox) {
234 if (watchdog_thread.get()) 235 if (watchdog_thread.get())
235 watchdog_thread->Stop(); 236 watchdog_thread->Stop();
236 gpu_info.sandboxed = InitializeSandbox(); 237 gpu_info.sandboxed = LinuxSandbox::InitializeSandbox();
237 if (watchdog_thread.get()) 238 if (watchdog_thread.get())
238 watchdog_thread->Start(); 239 watchdog_thread->Start();
239 } 240 }
240 } 241 }
241 #endif 242 #endif
242 243
243 #if defined(OS_WIN) 244 #if defined(OS_WIN)
244 { 245 {
245 TRACE_EVENT0("gpu", "Lower token"); 246 TRACE_EVENT0("gpu", "Lower token");
246 // For windows, if the target_services interface is not zero, the process 247 // For windows, if the target_services interface is not zero, the process
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 TRACE_EVENT0("gpu", "Initialize DXVA"); 355 TRACE_EVENT0("gpu", "Initialize DXVA");
355 // Initialize H/W video decoding stuff which fails in the sandbox. 356 // Initialize H/W video decoding stuff which fails in the sandbox.
356 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 357 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
357 } 358 }
358 #endif 359 #endif
359 } 360 }
360 361
361 } // namespace. 362 } // namespace.
362 363
363 } // namespace content 364 } // namespace content
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/ppapi_plugin/ppapi_plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698