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