diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 15:28:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:54:51 +0000 |
commit | 2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch) | |
tree | eb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/pdf/chunk_stream.h | |
parent | b014812705fc80bff0a5c120dfcef88f349816dc (diff) | |
download | qtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz |
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/pdf/chunk_stream.h')
-rw-r--r-- | chromium/pdf/chunk_stream.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/pdf/chunk_stream.h b/chromium/pdf/chunk_stream.h index 7eb75cf61b8..7fc092e1ed5 100644 --- a/chromium/pdf/chunk_stream.h +++ b/chromium/pdf/chunk_stream.h @@ -81,6 +81,10 @@ class ChunkStream { return filled_chunks_.Contains(chunks_range); } + bool IsChunkAvailable(uint32_t chunk_index) const { + return filled_chunks_.Contains(chunk_index); + } + void set_eof_pos(uint32_t eof_pos) { eof_pos_ = eof_pos; } uint32_t eof_pos() const { return eof_pos_; } @@ -90,6 +94,10 @@ class ChunkStream { return eof_pos_ > 0 && IsRangeAvailable(gfx::Range(0, eof_pos_)); } + bool IsValidChunkIndex(uint32_t chunk_index) const { + return !eof_pos_ || (chunk_index <= GetChunkIndex(eof_pos_ - 1)); + } + void Clear() { data_.clear(); eof_pos_ = 0; |