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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 #if defined(OS_LINUX) | 68 #if defined(OS_LINUX) |
69 #include "content/public/common/sandbox_init.h" | 69 #include "content/public/common/sandbox_init.h" |
70 #endif | 70 #endif |
71 | 71 |
72 #if defined(OS_MACOSX) | 72 #if defined(OS_MACOSX) |
73 #include "base/message_loop/message_pump_mac.h" | 73 #include "base/message_loop/message_pump_mac.h" |
74 #include "content/common/sandbox_mac.h" | 74 #include "content/common/sandbox_mac.h" |
75 #endif | 75 #endif |
76 | 76 |
77 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 77 #if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) |
78 #include "content/common/gpu/media/vaapi_wrapper.h" | 78 #include "content/common/gpu/media/vaapi_wrapper.h" |
79 #endif | 79 #endif |
80 | 80 |
81 #if defined(SANITIZER_COVERAGE) | 81 #if defined(SANITIZER_COVERAGE) |
82 #include <sanitizer/common_interface_defs.h> | 82 #include <sanitizer/common_interface_defs.h> |
83 #include <sanitizer/coverage_interface.h> | 83 #include <sanitizer/coverage_interface.h> |
84 #endif | 84 #endif |
85 | 85 |
86 #if defined(CYGPROFILE_INSTRUMENTATION) | 86 #if defined(CYGPROFILE_INSTRUMENTATION) |
87 const int kGpuTimeout = 30000; | 87 const int kGpuTimeout = 30000; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 // Initializes StatisticsRecorder which tracks UMA histograms. | 239 // Initializes StatisticsRecorder which tracks UMA histograms. |
240 base::StatisticsRecorder::Initialize(); | 240 base::StatisticsRecorder::Initialize(); |
241 | 241 |
242 gpu::GPUInfo gpu_info; | 242 gpu::GPUInfo gpu_info; |
243 // Get vendor_id, device_id, driver_version from browser process through | 243 // Get vendor_id, device_id, driver_version from browser process through |
244 // commandline switches. | 244 // commandline switches. |
245 GetGpuInfoFromCommandLine(gpu_info, command_line); | 245 GetGpuInfoFromCommandLine(gpu_info, command_line); |
246 gpu_info.in_process_gpu = false; | 246 gpu_info.in_process_gpu = false; |
247 | 247 |
248 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 248 #if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) |
249 VaapiWrapper::PreSandboxInitialization(); | 249 VaapiWrapper::PreSandboxInitialization(); |
250 #endif | 250 #endif |
251 | 251 |
252 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 252 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
253 // Set thread priority before sandbox initialization. | 253 // Set thread priority before sandbox initialization. |
254 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 254 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
255 #endif | 255 #endif |
256 | 256 |
257 // Warm up resources that don't need access to GPUInfo. | 257 // Warm up resources that don't need access to GPUInfo. |
258 if (WarmUpSandbox(command_line)) { | 258 if (WarmUpSandbox(command_line)) { |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 return true; | 584 return true; |
585 } | 585 } |
586 | 586 |
587 return false; | 587 return false; |
588 } | 588 } |
589 #endif // defined(OS_WIN) | 589 #endif // defined(OS_WIN) |
590 | 590 |
591 } // namespace. | 591 } // namespace. |
592 | 592 |
593 } // namespace content | 593 } // namespace content |
OLD | NEW |