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

Unified Diff: components/safe_browsing_db/v4_rice.cc

Issue 2206733002: PVer4: Verify checksum for downloaded updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_v4_rice_store
Patch Set: XXS: Added a DCHECK for PARTIAL_UPDATE in ProcessPartialUpdate Created 4 years, 4 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
Index: components/safe_browsing_db/v4_rice.cc
diff --git a/components/safe_browsing_db/v4_rice.cc b/components/safe_browsing_db/v4_rice.cc
index 3016fac87941e381e549b2535eb02e4125423c67..a290011f8d00101ca995e90a9ac904d0c7a26c51 100644
--- a/components/safe_browsing_db/v4_rice.cc
+++ b/components/safe_browsing_db/v4_rice.cc
@@ -264,10 +264,11 @@ void V4RiceDecoder::GetBitsFromCurrentWord(unsigned int num_requested_bits,
};
std::string V4RiceDecoder::DebugString() const {
Nathan Parker 2016/08/08 21:17:19 Are there constants describing what 4 and 8 are?
vakh (use Gerrit instead) 2016/08/08 22:46:47 Now using constants and added a comment describing
+ unsigned bits_read = (data_byte_index_ - 4) * 8 + current_word_bit_index_;
return base::StringPrintf(
- "current_word_: %x; data_byte_index_; %x, "
+ "bits_read: %x; current_word_: %x; data_byte_index_; %x, "
"current_word_bit_index_: %x; rice_parameter_: %x",
- current_word_, data_byte_index_, current_word_bit_index_,
+ bits_read, current_word_, data_byte_index_, current_word_bit_index_,
rice_parameter_);
}

Powered by Google App Engine
This is Rietveld 408576698