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

Unified Diff: webkit/glue/webkitclient_impl.cc

Issue 6873156: Move crypto_helpers from sync to base (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Follow bbretw review Created 9 years, 8 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
« no previous file with comments | « ppapi/shared_impl/crypto_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkitclient_impl.cc
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index b2dd53a8279319f8bad668f21d4af2adc6521d09..882cb426fa7abdd2cb6042545a52904270d4dbfe 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -451,13 +451,7 @@ double WebKitClientImpl::currentTime() {
void WebKitClientImpl::cryptographicallyRandomValues(
unsigned char* buffer, size_t length) {
- uint64 bytes = 0;
- for (size_t i = 0; i < length; ++i) {
- size_t offset = i % sizeof(bytes);
- if (!offset)
- bytes = base::RandUint64();
- buffer[i] = reinterpret_cast<unsigned char*>(&bytes)[offset];
- }
+ base::RandBytes(buffer, length);
}
void WebKitClientImpl::setSharedTimerFiredFunction(void (*func)()) {
« no previous file with comments | « ppapi/shared_impl/crypto_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698