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

Unified Diff: extensions/browser/content_hash_reader.h

Issue 2771953003: Fix content verification code for undreadable and deleted files. (Closed)
Patch Set: address comments change DCHECK Created 3 years, 9 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
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/content_hash_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_hash_reader.h
diff --git a/extensions/browser/content_hash_reader.h b/extensions/browser/content_hash_reader.h
index 0848a72ab786334c238db3133f819218eaceeb84..0b305023b6eccf93e2aad5c01bc6dc7fb7c1d2be 100644
--- a/extensions/browser/content_hash_reader.h
+++ b/extensions/browser/content_hash_reader.h
@@ -39,15 +39,17 @@ class ContentHashReader : public base::RefCountedThreadSafe<ContentHashReader> {
// should likely be discarded.
bool Init();
- // Indicates whether the content in question exists in the local extension
- // installation. This may be |false| if Init fails.
- bool content_exists() const { return content_exists_; }
-
// These return whether we found valid verified_contents.json /
// computed_hashes.json files respectively. Note that both of these can be
// true but we still didn't find an entry for |relative_path_| in them.
bool have_verified_contents() const { return have_verified_contents_; }
bool have_computed_hashes() const { return have_computed_hashes_; }
+ // Returns whether or not this resource's entry exists in
+ // verified_contents.json (given that both |have_verified_contents_| and
+ // |have_computed_hashes_| are true).
+ bool file_missing_from_verified_contents() const {
+ return file_missing_from_verified_contents_;
+ }
// Return the number of blocks and block size, respectively. Only valid after
// calling Init().
@@ -72,10 +74,9 @@ class ContentHashReader : public base::RefCountedThreadSafe<ContentHashReader> {
InitStatus status_;
- bool content_exists_;
-
bool have_verified_contents_;
bool have_computed_hashes_;
+ bool file_missing_from_verified_contents_;
// The blocksize used for generating the hashes.
int block_size_;
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/content_hash_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698