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

Unified Diff: extensions/browser/content_verify_job.cc

Issue 407043002: Content Verification: Don't access UI-thread objects on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added DCHECK Created 6 years, 5 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_verifier_io_data.cc ('k') | extensions/extensions.gyp » ('j') | 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 1bf68cb6a6bada05f471d5ed5c8fe173390dc1d3..f8618bc02e9bfc525240a940ad533d2e36cc090b 100644
--- a/extensions/browser/content_verify_job.cc
+++ b/extensions/browser/content_verify_job.cc
@@ -137,15 +137,16 @@ bool ContentVerifyJob::FinishBlock() {
return true;
std::string final(crypto::kSHA256Length, 0);
current_hash_->Finish(string_as_array(&final), final.size());
+ current_hash_.reset();
+ current_hash_byte_count_ = 0;
+
+ int block = current_block_++;
const std::string* expected_hash = NULL;
- if (!hash_reader_->GetHashForBlock(current_block_, &expected_hash) ||
+ if (!hash_reader_->GetHashForBlock(block, &expected_hash) ||
*expected_hash != final)
return false;
- current_hash_.reset();
- current_hash_byte_count_ = 0;
- current_block_++;
return true;
}
« no previous file with comments | « extensions/browser/content_verifier_io_data.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698