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

Unified Diff: extensions/browser/verified_contents.cc

Issue 2751913009: Remove some VerifiedContents methods' params that are always false. (Closed)
Patch Set: 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/verified_contents.h ('k') | extensions/browser/verified_contents_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/verified_contents.cc
diff --git a/extensions/browser/verified_contents.cc b/extensions/browser/verified_contents.cc
index 29404843c8e0bdc3cbefd31622f85fcacf6ac3d8..7ae66762efcb62b38e577ae1c3104eaf999a4fb4 100644
--- a/extensions/browser/verified_contents.cc
+++ b/extensions/browser/verified_contents.cc
@@ -90,10 +90,9 @@ VerifiedContents::~VerifiedContents() {
// }
// ]
// }
-bool VerifiedContents::InitFrom(const base::FilePath& path,
- bool ignore_invalid_signature) {
+bool VerifiedContents::InitFrom(const base::FilePath& path) {
std::string payload;
- if (!GetPayload(path, &payload, ignore_invalid_signature))
+ if (!GetPayload(path, &payload))
return false;
std::unique_ptr<base::Value> value(base::JSONReader::Read(payload));
@@ -230,8 +229,7 @@ bool VerifiedContents::TreeHashRootEquals(const base::FilePath& relative_path,
// the extension's key too (eg for non-webstore hosted extensions such as
// enterprise installs).
bool VerifiedContents::GetPayload(const base::FilePath& path,
- std::string* payload,
- bool ignore_invalid_signature) {
+ std::string* payload) {
std::string contents;
if (!base::ReadFileToString(path, &contents))
return false;
@@ -284,7 +282,7 @@ bool VerifiedContents::GetPayload(const base::FilePath& path,
valid_signature_ =
VerifySignature(protected_value, encoded_payload, decoded_signature);
- if (!valid_signature_ && !ignore_invalid_signature)
+ if (!valid_signature_)
return false;
if (!base::Base64UrlDecode(encoded_payload,
« no previous file with comments | « extensions/browser/verified_contents.h ('k') | extensions/browser/verified_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698