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 /base/rand_util_posix.cc | |
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 'base/rand_util_posix.cc')
-rw-r--r-- | base/rand_util_posix.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/base/rand_util_posix.cc b/base/rand_util_posix.cc index 6abf5f8..abb404a 100644 --- a/base/rand_util_posix.cc +++ b/base/rand_util_posix.cc @@ -1,9 +1,8 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/rand_util.h" -#include "base/rand_util_c.h" #include <errno.h> #include <fcntl.h> @@ -54,8 +53,8 @@ uint64 RandUint64() { return number; } -} // namespace base - int GetUrandomFD(void) { return g_urandom_fd.Pointer()->fd(); } + +} // namespace base |