1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CREATOR_FILTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CREATOR_FILTER_H_ 7 8 #include "base/memory/ref_counted.h" 9 10 namespace base { 11 class FilePath; 12 } 13 14 namespace extensions { 15 16 // Determines which files should be included in a packaged extension. 17 // Designed specifically to operate with the callback in chrome/common/zip. 18 class ExtensionCreatorFilter 19 : public base::RefCounted<ExtensionCreatorFilter> { 20 public: 21 ExtensionCreatorFilter() {} 22 23 // Returns true if the given base::FilePath should be included in a 24 // packed extension. 25 bool ShouldPackageFile(const base::FilePath& file_path); 26 27 private: 28 friend class base::RefCounted<ExtensionCreatorFilter>; 29 ~ExtensionCreatorFilter() {} 30 DISALLOW_COPY_AND_ASSIGN(ExtensionCreatorFilter); 31 }; 32 33 } // namespace etensions 34 35 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CREATOR_FILTER_H_ 36