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

Unified Diff: components/subresource_filter/core/common/unindexed_ruleset.h

Issue 2279803002: Fix UnindexedRulesetWriter finishing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove redundant test. 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/subresource_filter/core/common/unindexed_ruleset.h
diff --git a/components/subresource_filter/core/common/unindexed_ruleset.h b/components/subresource_filter/core/common/unindexed_ruleset.h
index 62b417bcf2637ffbf7586628f3547ef425e8e944..af847ea8a06a6d55385841aa22eebd499883c2ed 100644
--- a/components/subresource_filter/core/common/unindexed_ruleset.h
+++ b/components/subresource_filter/core/common/unindexed_ruleset.h
@@ -42,6 +42,9 @@ class UnindexedRulesetReader {
// ReadNextChunk is undefined befaviour.
bool ReadNextChunk(proto::FilteringRules* chunk);
+ // Returns how many bytes of the |stream| have been consumed.
+ int num_bytes_read() const { return coded_stream_.CurrentPosition(); }
+
private:
google::protobuf::io::CodedInputStream coded_stream_;

Powered by Google App Engine
This is Rietveld 408576698