| Index: components/safe_browsing_db/v4_rice.h
|
| diff --git a/components/safe_browsing_db/v4_rice.h b/components/safe_browsing_db/v4_rice.h
|
| index b9ab9f265f334e25fedc5bbd53e95508dc934cd7..9bff397d4c4342991574d6813a40c3e43b7cd831 100644
|
| --- a/components/safe_browsing_db/v4_rice.h
|
| +++ b/components/safe_browsing_db/v4_rice.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include <ostream>
|
| #include <string>
|
| +#include <vector>
|
| #include "base/gtest_prod_util.h"
|
|
|
| #if defined(USE_SYSTEM_PROTOBUF)
|
| @@ -65,7 +66,7 @@ class V4RiceDecoder {
|
| // |first_value| = 3, |num_entries| = 2 and decoding the |encoded_data| will
|
| // produce the offsets: [4, 18].
|
| static V4DecodeResult DecodeIntegers(
|
| - const ::google::protobuf::int32 first_value,
|
| + const ::google::protobuf::int64 first_value,
|
| const ::google::protobuf::int32 rice_parameter,
|
| const ::google::protobuf::int32 num_entries,
|
| const std::string& encoded_data,
|
| @@ -75,11 +76,11 @@ class V4RiceDecoder {
|
| // hash prefixes and stores them in |out|. The rest of the arguments are the
|
| // same as for |DecodeIntegers|.
|
| static V4DecodeResult DecodeBytes(
|
| - const ::google::protobuf::int32 first_value,
|
| + const ::google::protobuf::int64 first_value,
|
| const ::google::protobuf::int32 rice_parameter,
|
| const ::google::protobuf::int32 num_entries,
|
| const std::string& encoded_data,
|
| - std::string* out);
|
| + std::vector<uint32_t>* out);
|
|
|
| virtual ~V4RiceDecoder();
|
|
|
| @@ -90,8 +91,7 @@ class V4RiceDecoder {
|
| FRIEND_TEST_ALL_PREFIXES(V4RiceTest, TestDecoderGetNextBitsWithNoData);
|
| FRIEND_TEST_ALL_PREFIXES(V4RiceTest, TestDecoderGetNextValueWithNoData);
|
| FRIEND_TEST_ALL_PREFIXES(V4RiceTest, TestDecoderGetNextValueWithNoEntries);
|
| - FRIEND_TEST_ALL_PREFIXES(V4RiceTest, TestDecoderGetNextValueWithSmallValues);
|
| - FRIEND_TEST_ALL_PREFIXES(V4RiceTest, TestDecoderGetNextValueWithLargeValues);
|
| + friend class V4RiceTest;
|
|
|
| // Validate some of the parameters passed to the decode methods.
|
| static V4DecodeResult ValidateInput(
|
| @@ -122,7 +122,7 @@ class V4RiceDecoder {
|
| V4DecodeResult GetNextBits(unsigned int num_requested_bits, uint32_t* x);
|
|
|
| // Reads |num_requested_bits| from |current_word_|.
|
| - void GetBitsFromCurrentWord(unsigned int num_requested_bits, uint32_t* x);
|
| + uint32_t GetBitsFromCurrentWord(unsigned int num_requested_bits);
|
|
|
| // The Rice parameter, which is the exponent of two for calculating 'M'. 'M'
|
| // is used as the base to calculate the quotient and remainder in the
|
|
|