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

Unified Diff: extensions/utility/unpacker.cc

Issue 2321823002: Exclude exe files while unzipping CRXes (Closed)
Patch Set: Devlin comments Created 4 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
« no previous file with comments | « extensions/utility/unpacker.h ('k') | extensions/utility/unpacker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/utility/unpacker.cc
diff --git a/extensions/utility/unpacker.cc b/extensions/utility/unpacker.cc
index 4c3dbd48a947979061842f9d4b12cb64d8bae7b2..a895c8cdef717b3ffa1405fba0219eb96cf14eb1 100644
--- a/extensions/utility/unpacker.cc
+++ b/extensions/utility/unpacker.cc
@@ -115,6 +115,11 @@ Unpacker::Unpacker(const base::FilePath& working_dir,
Unpacker::~Unpacker() {
}
+// static
+bool Unpacker::ShouldExtractFile(const base::FilePath& file_path) {
+ return file_path.FinalExtension() != FILE_PATH_LITERAL(".exe");
hshi 2016/09/08 22:54:43 See filepath.h: // Returns true if the file pat
meacer 2016/09/09 00:37:14 Oh, great catch! Done, and I updated the crx with
+}
+
std::unique_ptr<base::DictionaryValue> Unpacker::ReadManifest() {
base::FilePath manifest_path = extension_dir_.Append(kManifestFilename);
if (!base::PathExists(manifest_path)) {
« no previous file with comments | « extensions/utility/unpacker.h ('k') | extensions/utility/unpacker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698