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

Unified Diff: base/md5.cc

Issue 7466003: MD5Update function uses StringPiece instead of raw buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to StringPiece Created 9 years, 5 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 | « base/md5.h ('k') | base/md5_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/md5.cc
diff --git a/base/md5.cc b/base/md5.cc
index 2211a285e5badf8ef181c3910b10c73e347be4ce..2a518ec80ef99d797a4108ecdcc8830d0d8d5725 100644
--- a/base/md5.cc
+++ b/base/md5.cc
@@ -210,6 +210,11 @@ void MD5Update(MD5Context* context, const void* inbuf, size_t len) {
memcpy(ctx->in, buf, len);
}
+// Call through to the raw pointer version.
+void MD5Update(MD5Context* context, const StringPiece& data) {
brettw 2011/07/20 20:26:28 I think you should change the original function ra
+ MD5Update(context, data.data(), data.size());
+}
+
/*
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
« no previous file with comments | « base/md5.h ('k') | base/md5_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698