1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/base/rand_util.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,23 @@ 1.4 +// Copyright (c) 2008 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef BASE_RAND_UTIL_H_ 1.9 +#define BASE_RAND_UTIL_H_ 1.10 + 1.11 +#include "base/basictypes.h" 1.12 + 1.13 +namespace base { 1.14 + 1.15 +// Returns a random number in range [0, kuint64max]. Thread-safe. 1.16 +uint64_t RandUint64(); 1.17 + 1.18 +// Returns a random number between min and max (inclusive). Thread-safe. 1.19 +int RandInt(int min, int max); 1.20 + 1.21 +// Returns a random double in range [0, 1). Thread-safe. 1.22 +double RandDouble(); 1.23 + 1.24 +} // namespace base 1.25 + 1.26 +#endif // BASE_RAND_UTIL_H_