Chromium Code Reviews| Index: base/rand_util.h |
| diff --git a/base/rand_util.h b/base/rand_util.h |
| index 6bfbcb4896d087e1a144aaa19d40aa42321bcebf..3602585138dd283b6e0ef333e2b2757dae0dd374 100644 |
| --- a/base/rand_util.h |
| +++ b/base/rand_util.h |
| @@ -10,6 +10,7 @@ |
| #include "base/base_api.h" |
| #include "base/basictypes.h" |
| +#include "base/callback.h" |
| namespace base { |
| @@ -19,6 +20,8 @@ BASE_API uint64 RandUint64(); |
| // Returns a random number between min and max (inclusive). Thread-safe. |
| BASE_API int RandInt(int min, int max); |
| +typedef base::Callback<int(int, int)> RandIntCallback; |
|
brettw
2011/06/27 22:24:48
I don't understand why this is here. It's not nece
agayev
2011/06/27 23:53:52
I thought callback for a RandInt is general enough
willchan no longer on Chromium
2011/06/28 09:58:23
This looks to be an ease of use vs dependency bloa
brettw
2011/06/28 16:09:52
I might define it at the top of your DNS class so
agayev
2011/06/28 16:22:20
It's not specific to DNS. For example, UDPSocket
|
| + |
| // Returns a random number in range [0, max). Thread-safe. |
| // |
| // Note that this can be used as an adapter for std::random_shuffle(): |