| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // Warm up the crypto subsystem, which needs to done pre-sandbox on all | 351 // Warm up the crypto subsystem, which needs to done pre-sandbox on all |
| 352 // platforms. | 352 // platforms. |
| 353 crypto::HMAC hmac(crypto::HMAC::SHA256); | 353 crypto::HMAC hmac(crypto::HMAC::SHA256); |
| 354 unsigned char key = '\0'; | 354 unsigned char key = '\0'; |
| 355 if (!hmac.Init(&key, sizeof(key))) { | 355 if (!hmac.Init(&key, sizeof(key))) { |
| 356 LOG(ERROR) << "WarmUpSandbox() failed with crypto::HMAC::Init()"; | 356 LOG(ERROR) << "WarmUpSandbox() failed with crypto::HMAC::Init()"; |
| 357 return false; | 357 return false; |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 | 360 |
| 361 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) | 361 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |
| 362 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | |
| 363 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | |
| 364 VaapiWrapper::PreSandboxInitialization(); | 362 VaapiWrapper::PreSandboxInitialization(); |
| 365 #endif | 363 #endif |
| 366 | 364 |
| 367 #if defined(OS_WIN) | 365 #if defined(OS_WIN) |
| 368 { | 366 { |
| 369 TRACE_EVENT0("gpu", "Preload setupapi.dll"); | 367 TRACE_EVENT0("gpu", "Preload setupapi.dll"); |
| 370 // Preload this DLL because the sandbox prevents it from loading. | 368 // Preload this DLL because the sandbox prevents it from loading. |
| 371 if (LoadLibrary(L"setupapi.dll") == NULL) { | 369 if (LoadLibrary(L"setupapi.dll") == NULL) { |
| 372 LOG(ERROR) << "WarmUpSandbox() failed with loading setupapi.dll"; | 370 LOG(ERROR) << "WarmUpSandbox() failed with loading setupapi.dll"; |
| 373 return false; | 371 return false; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 return true; | 447 return true; |
| 450 } | 448 } |
| 451 | 449 |
| 452 return false; | 450 return false; |
| 453 } | 451 } |
| 454 #endif // defined(OS_WIN) | 452 #endif // defined(OS_WIN) |
| 455 | 453 |
| 456 } // namespace. | 454 } // namespace. |
| 457 | 455 |
| 458 } // namespace content | 456 } // namespace content |
| OLD | NEW |