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

Unified Diff: components/rappor/byte_vector_utils.h

Issue 1112003002: Use 64 bit shift when convert uint64_t to ByteVector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | components/rappor/byte_vector_utils.cc » ('j') | components/rappor/byte_vector_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/byte_vector_utils.h
diff --git a/components/rappor/byte_vector_utils.h b/components/rappor/byte_vector_utils.h
index 3090d9bc76f5d33bac0d0100600b387477fd4775..19109f4aa454ec67877b01ed0c5fd4de20bd4579 100644
--- a/components/rappor/byte_vector_utils.h
+++ b/components/rappor/byte_vector_utils.h
@@ -17,6 +17,9 @@ namespace rappor {
// A vector of 8-bit integers used to store a set of binary bits.
typedef std::vector<uint8_t> ByteVector;
+// Converts the lowest |size| bytes of |value| into a ByteVector.
+void Uint64ToByteVector(uint64_t value, uint64_t size, ByteVector* output);
Alexei Svitkine (slow) 2015/04/29 15:01:07 Why is size a uint64_t? Should just be an int.
Steven Holte 2015/04/29 18:18:56 Changed to size_t
+
// Computes a bitwise AND of byte vectors and stores the result in rhs.
// Returns rhs for chaining.
ByteVector* ByteVectorAnd(const ByteVector& lhs, ByteVector* rhs);
« no previous file with comments | « no previous file | components/rappor/byte_vector_utils.cc » ('j') | components/rappor/byte_vector_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698