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

Unified Diff: content/gpu/gpu_main.cc

Issue 10398003: Merge 136400 - Warm up the crypto subsystem before entering the GPU sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
===================================================================
--- content/gpu/gpu_main.cc (revision 136808)
+++ content/gpu/gpu_main.cc (working copy)
@@ -22,6 +22,7 @@
#include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_info_collector.h"
#include "content/gpu/gpu_process.h"
+#include "crypto/hmac.h"
#include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/gl/gl_switches.h"
@@ -103,6 +104,13 @@
// platforms.
(void) base::RandUint64();
+ // Warm up the crypto subsystem, which needs to done pre-sandbox on all
+ // platforms.
+ crypto::HMAC hmac(crypto::HMAC::SHA256);
+ unsigned char key = '\0';
+ bool ret = hmac.Init(&key, sizeof(key));
+ (void) ret;
+
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
content::InitializeSandbox();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698