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

Unified Diff: extensions/browser/content_verify_job.cc

Issue 512573003: Content verification: Don't fail on non-existence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « extensions/browser/content_hash_reader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_verify_job.cc
diff --git a/extensions/browser/content_verify_job.cc b/extensions/browser/content_verify_job.cc
index f8618bc02e9bfc525240a940ad533d2e36cc090b..e7e8cab9dd69a7bdf4298876a6f8966138e167a6 100644
--- a/extensions/browser/content_verify_job.cc
+++ b/extensions/browser/content_verify_job.cc
@@ -152,11 +152,15 @@ bool ContentVerifyJob::FinishBlock() {
void ContentVerifyJob::OnHashesReady(bool success) {
if (!success && !g_test_delegate) {
- if (hash_reader_->have_verified_contents() &&
- hash_reader_->have_computed_hashes())
+ if (!hash_reader_->content_exists()) {
+ // Ignore verification of non-existent resources.
+ return;
+ } else if (hash_reader_->have_verified_contents() &&
+ hash_reader_->have_computed_hashes()) {
DispatchFailureCallback(NO_HASHES_FOR_FILE);
- else
+ } else {
DispatchFailureCallback(MISSING_ALL_HASHES);
+ }
return;
}
« no previous file with comments | « extensions/browser/content_hash_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698