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

Unified Diff: extensions/utility/extension_extractor_filter.cc

Issue 2321823002: Exclude exe files while unzipping CRXes (Closed)
Patch Set: Fix build 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
Index: extensions/utility/extension_extractor_filter.cc
diff --git a/extensions/utility/extension_extractor_filter.cc b/extensions/utility/extension_extractor_filter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..972ba117fa02bc53ec896c3ba55dfab0107bc298
--- /dev/null
+++ b/extensions/utility/extension_extractor_filter.cc
@@ -0,0 +1,17 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/utility/extension_extractor_filter.h"
+
+#include "base/files/file_path.h"
+#include "base/macros.h"
+
+namespace extensions {
+
+bool ExtensionExtractorFilter::ShouldExtractFile(
+ const base::FilePath& file_path) {
+ return file_path.Extension() != FILE_PATH_LITERAL(".exe");
Devlin 2016/09/08 21:10:16 Should this be FinalExtension()?
meacer 2016/09/08 22:40:10 Extension() and FinalExtension() seems to differ o
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698