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.h | |
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.h')
-rw-r--r-- | base/rand_util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/rand_util.h b/base/rand_util.h index 8d795a3..82e548b 100644 --- a/base/rand_util.h +++ b/base/rand_util.h @@ -1,4 +1,4 @@ -// 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. @@ -43,6 +43,10 @@ BASE_EXPORT void RandBytes(void* output, size_t output_length); // Note that this is a variation of |RandBytes| with a different return type. BASE_EXPORT std::string RandBytesAsString(size_t length); +#ifdef OS_POSIX +BASE_EXPORT int GetUrandomFD(); +#endif + } // namespace base #endif // BASE_RAND_UTIL_H_ |