diff options
author | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 14:26:13 +0000 |
---|---|---|
committer | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 14:26:13 +0000 |
commit | ead8c1fa606c9a8712c8bb71bdb656f5357c717f (patch) | |
tree | 323db9d7fcb386f92b913ab876d2e2e714a78f47 /chrome/nacl | |
parent | a796f2093103d4895214b777ed2987a929c28f54 (diff) | |
download | chromium_src-ead8c1fa606c9a8712c8bb71bdb656f5357c717f.zip chromium_src-ead8c1fa606c9a8712c8bb71bdb656f5357c717f.tar.gz chromium_src-ead8c1fa606c9a8712c8bb71bdb656f5357c717f.tar.bz2 |
Cleanup: Remove the C version of GetUrandomFD()
I originally added this in a #includable-from-C header so that it
could be #included from NaCl-side code. However, having NaCl #include
Chromium headers is not a clean interface, and this has since been
replaced by runtime dependency injection.
We move the function to a C++ header and put it into a namespace.
Also fix the error return value for UrandomFD() so that it can't be
confused with stdin.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=2655
TEST=build
Review URL: https://chromiumcodereview.appspot.com/10446043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/nacl_listener.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc index 1f48ef5..01a3305 100644 --- a/chrome/nacl/nacl_listener.cc +++ b/chrome/nacl/nacl_listener.cc @@ -11,7 +11,7 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/rand_util_c.h" +#include "base/rand_util.h" #include "chrome/common/nacl_messages.h" #include "chrome/nacl/nacl_validation_db.h" #include "chrome/nacl/nacl_validation_query.h" @@ -192,7 +192,7 @@ void NaClListener::OnMsgStart(const nacl::NaClStartParams& params) { std::vector<nacl::FileDescriptor> handles = params.handles; #if defined(OS_LINUX) || defined(OS_MACOSX) - args->urandom_fd = dup(GetUrandomFD()); + args->urandom_fd = dup(base::GetUrandomFD()); if (args->urandom_fd < 0) { LOG(ERROR) << "Failed to dup() the urandom FD"; return; |