Index: components/nacl/renderer/ppb_nacl_private_impl.cc |
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc |
index 00bfcdcd4e0f637564c6236c167bc09f4ce9c57a..eda62cd6c689a5a0c4889e8fc3df863ef8aff6ad 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -22,6 +22,7 @@ |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/macros.h" |
+#include "base/rand_util.h" |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
@@ -619,6 +620,14 @@ |
return PP_FALSE; |
} |
+int UrandomFD(void) { |
+#if defined(OS_POSIX) |
+ return base::GetUrandomFD(); |
+#else |
+ return -1; |
+#endif |
+} |
+ |
// Convert a URL to a filename for GetReadonlyPnaclFd. |
// Must be kept in sync with PnaclCanOpenFile() in |
// components/nacl/browser/nacl_file_host.cc. |
@@ -1691,6 +1700,7 @@ |
const PPB_NaCl_Private nacl_interface = { |
&LaunchSelLdr, |
+ &UrandomFD, |
&GetReadExecPnaclFd, |
&CreateTemporaryFile, |
&GetNumberOfProcessors, |