| Index: third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp b/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp
|
| index 056c64a86e8d33587e60a945217cd5c5d1e83356..b52e43151b3d328780b8b00403257ece7721e2ab 100644
|
| --- a/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp
|
| +++ b/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp
|
| @@ -24,28 +24,24 @@ namespace WTF {
|
|
|
| static bool s_shouldUseAlwaysZeroRandomSourceForTesting = false;
|
|
|
| -void setAlwaysZeroRandomSourceForTesting()
|
| -{
|
| - s_shouldUseAlwaysZeroRandomSourceForTesting = true;
|
| +void setAlwaysZeroRandomSourceForTesting() {
|
| + s_shouldUseAlwaysZeroRandomSourceForTesting = true;
|
| }
|
|
|
| -uint32_t cryptographicallyRandomNumber()
|
| -{
|
| - uint32_t result;
|
| - cryptographicallyRandomValues(&result, sizeof(result));
|
| - return result;
|
| +uint32_t cryptographicallyRandomNumber() {
|
| + uint32_t result;
|
| + cryptographicallyRandomValues(&result, sizeof(result));
|
| + return result;
|
| }
|
|
|
| -void cryptographicallyRandomValues(void* buffer, size_t length)
|
| -{
|
| - if (s_shouldUseAlwaysZeroRandomSourceForTesting) {
|
| - memset(buffer, '\0', length);
|
| - return;
|
| - }
|
| +void cryptographicallyRandomValues(void* buffer, size_t length) {
|
| + if (s_shouldUseAlwaysZeroRandomSourceForTesting) {
|
| + memset(buffer, '\0', length);
|
| + return;
|
| + }
|
|
|
| - // This should really be crypto::RandBytes(), but WTF can't depend on crypto. The implementation of
|
| - // crypto::RandBytes() is just calling base::RandBytes(), so both are actually same.
|
| - base::RandBytes(buffer, length);
|
| + // This should really be crypto::RandBytes(), but WTF can't depend on crypto. The implementation of
|
| + // crypto::RandBytes() is just calling base::RandBytes(), so both are actually same.
|
| + base::RandBytes(buffer, length);
|
| }
|
| -
|
| }
|
|
|