diff options
author | Narayan Kamath <narayan@google.com> | 2020-01-08 16:02:50 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2020-01-14 13:22:44 +0000 |
commit | bd22bb0deddb236fbdfa8c5797cfd7f15c1a0c73 (patch) | |
tree | 42a94e36d2e358ab91211c3317e9c31896c9a5e2 /jni/include | |
parent | e59ed6bc05f55439d9722973192476ff85dfc261 (diff) | |
download | MediaProvider-bd22bb0deddb236fbdfa8c5797cfd7f15c1a0c73.tar.gz |
Const correctness handle / RedactionInfo.
Helps us CHECK that they're always constructed with valid
RedactionInfo etc.
Test: atest FuseDaemonHostTest
Test: atest fuse_node_test
Bug: 147274248
Change-Id: I2cc369574d14136521201b4c8b99fe22e7ec0463
Diffstat (limited to 'jni/include')
-rw-r--r-- | jni/include/libfuse_jni/RedactionInfo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jni/include/libfuse_jni/RedactionInfo.h b/jni/include/libfuse_jni/RedactionInfo.h index 134ee90dd..5218e28a6 100644 --- a/jni/include/libfuse_jni/RedactionInfo.h +++ b/jni/include/libfuse_jni/RedactionInfo.h @@ -69,20 +69,20 @@ class RedactionInfo { * relevant redaction ranges, the vector will be empty. */ std::unique_ptr<std::vector<RedactionRange>> getOverlappingRedactionRanges(size_t size, - off64_t off); + off64_t off) const; /** * Returns whether any ranges need to be redacted. */ - bool isRedactionNeeded(); + bool isRedactionNeeded() const; /** * Returns number of redaction ranges. */ - int size(); + int size() const; private: std::vector<RedactionRange> redaction_ranges_; void processRedactionRanges(int redaction_ranges_num, const off64_t* redaction_ranges); - bool hasOverlapWithReadRequest(size_t size, off64_t off); + bool hasOverlapWithReadRequest(size_t size, off64_t off) const; }; } // namespace fuse |