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

Unified Diff: extensions/browser/content_hash_reader.cc

Issue 585583003: Fix case-sensitivity problems in extension content verification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo change to extension_protocols.cc Created 6 years, 3 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
Index: extensions/browser/content_hash_reader.cc
diff --git a/extensions/browser/content_hash_reader.cc b/extensions/browser/content_hash_reader.cc
index 76fb3e2941b08d932ff26a03b955782ff556825b..76c7e606126e5d71d82cfe220123c77edaccf261 100644
--- a/extensions/browser/content_hash_reader.cc
+++ b/extensions/browser/content_hash_reader.cc
@@ -85,14 +85,9 @@ bool ContentHashReader::Init() {
block_size_ % crypto::kSHA256Length != 0)
return false;
- const std::string* expected_root =
- verified_contents_->GetTreeHashRoot(relative_path_);
- if (!expected_root)
- return false;
-
std::string root =
ComputeTreeHashRoot(hashes_, block_size_ / crypto::kSHA256Length);
- if (*expected_root != root)
+ if (!verified_contents_->TreeHashRootEquals(relative_path_, root))
return false;
status_ = SUCCESS;

Powered by Google App Engine
This is Rietveld 408576698