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

Unified Diff: extensions/utility/extension_extractor_filter.h

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.h
diff --git a/extensions/utility/extension_extractor_filter.h b/extensions/utility/extension_extractor_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..c21ba3d148f83056b7187338d8c93efe2221aa6e
--- /dev/null
+++ b/extensions/utility/extension_extractor_filter.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef EXTENSIONS_UTILITY_EXTENSION_EXTRACTOR_FILTER_H_
+#define EXTENSIONS_UTILITY_EXTENSION_EXTRACTOR_FILTER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+
+namespace base {
+class FilePath;
+}
+
+namespace extensions {
+
+// Determines which files should be included when unzipping a CRX.
+class ExtensionExtractorFilter
+ : public base::RefCounted<ExtensionExtractorFilter> {
Devlin 2016/09/08 21:10:16 Given this class doesn't need any state, I'd much
meacer 2016/09/08 22:40:10 That's fair, I copied this over from ExtensionCrea
+ public:
+ ExtensionExtractorFilter() {}
+
+ // Returns true if the given base::FilePath should be unzipped.
+ bool ShouldExtractFile(const base::FilePath& file_path);
+
+ private:
+ friend class base::RefCounted<ExtensionExtractorFilter>;
+ ~ExtensionExtractorFilter() {}
+ DISALLOW_COPY_AND_ASSIGN(ExtensionExtractorFilter);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_UTILITY_EXTENSION_EXTRACTOR_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698