| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ | 5 #ifndef GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ |
| 6 #define GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ | 6 #define GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| 9 | 11 |
| 10 namespace invalidation { | 12 namespace invalidation { |
| 11 | 13 |
| 12 class Random { | 14 class Random { |
| 13 public: | 15 public: |
| 14 // We don't actually use the seed. | 16 // We don't actually use the seed. |
| 15 explicit Random(int64 seed) {} | 17 explicit Random(int64_t seed) {} |
| 16 | 18 |
| 17 virtual ~Random() {} | 19 virtual ~Random() {} |
| 18 | 20 |
| 19 // Returns a pseudorandom value between(inclusive) and(exclusive). | 21 // Returns a pseudorandom value between(inclusive) and(exclusive). |
| 20 virtual double RandDouble(); | 22 virtual double RandDouble(); |
| 21 | 23 |
| 22 virtual uint64 RandUint64(); | 24 virtual uint64_t RandUint64(); |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 } // namespace invalidation | 27 } // namespace invalidation |
| 26 | 28 |
| 27 #endif // GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ | 29 #endif // GOOGLE_CACHEINVALIDATION_DEPS_RANDOM_H_ |
| OLD | NEW |