| Index: components/rappor/sample.cc
|
| diff --git a/components/rappor/sample.cc b/components/rappor/sample.cc
|
| index 6fbe615a5dc4cc0dde46dffe5b242858a08578fb..0fce9f80fc46f9b503f7a137b9d1e2ebb0e3925e 100644
|
| --- a/components/rappor/sample.cc
|
| +++ b/components/rappor/sample.cc
|
| @@ -58,12 +58,7 @@ void Sample::ExportMetrics(const std::string& secret,
|
| DCHECK(it != sizes_.end());
|
| uint64_t size = it->second;
|
| ByteVector value_bytes(size);
|
| - for (size_t i = 0; i < size; i++) {
|
| - // Get the value of the i-th smallest byte and copy it to the byte vector.
|
| - uint64_t shift = i * 8;
|
| - uint64_t byte_mask = 0xff << shift;
|
| - value_bytes[i] = (value & byte_mask) >> shift;
|
| - }
|
| + Uint64ToByteVector(value, size, &value_bytes);
|
| ByteVector report_bytes = internal::GenerateReport(
|
| secret, parameters_, value_bytes);
|
|
|
|
|