Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
-
}
« no previous file with comments | « third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.h ('k') | third_party/WebKit/Source/wtf/CurrentTime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698