| Index: extensions/browser/content_hash_reader.cc
|
| diff --git a/extensions/browser/content_hash_reader.cc b/extensions/browser/content_hash_reader.cc
|
| index c1e6e95642caba875dd3115abf413eb6a120219c..1c9ae97c62a1602022435057313f3bcf198d9b0d 100644
|
| --- a/extensions/browser/content_hash_reader.cc
|
| +++ b/extensions/browser/content_hash_reader.cc
|
| @@ -35,6 +35,7 @@ ContentHashReader::ContentHashReader(const std::string& extension_id,
|
| relative_path_(relative_path),
|
| key_(key),
|
| status_(NOT_INITIALIZED),
|
| + content_exists_(false),
|
| have_verified_contents_(false),
|
| have_computed_hashes_(false),
|
| block_size_(0) {
|
| @@ -50,6 +51,13 @@ bool ContentHashReader::Init() {
|
| base::FilePath verified_contents_path =
|
| file_util::GetVerifiedContentsPath(extension_root_);
|
|
|
| + // Check that this is a valid resource to verify (i.e., it exists).
|
| + base::FilePath content_path = extension_root_.Append(relative_path_);
|
| + if (!base::PathExists(content_path))
|
| + return false;
|
| +
|
| + content_exists_ = true;
|
| +
|
| if (!base::PathExists(verified_contents_path))
|
| return false;
|
|
|
|
|