| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 std::string* error); | 71 std::string* error); |
| 72 | 72 |
| 73 // Uninstalls the extension |id| from the install directory |extensions_dir|. | 73 // Uninstalls the extension |id| from the install directory |extensions_dir|. |
| 74 void UninstallExtension(const std::string& id, const FilePath& extensions_dir); | 74 void UninstallExtension(const std::string& id, const FilePath& extensions_dir); |
| 75 | 75 |
| 76 // Clean up directories that aren't valid extensions from the install directory. | 76 // Clean up directories that aren't valid extensions from the install directory. |
| 77 // TODO(aa): Also consider passing in a list of known current extensions and | 77 // TODO(aa): Also consider passing in a list of known current extensions and |
| 78 // removing others? | 78 // removing others? |
| 79 void GarbageCollectExtensions(const FilePath& extensions_dir); | 79 void GarbageCollectExtensions(const FilePath& extensions_dir); |
| 80 | 80 |
| 81 // We need to reserve the namespace of entries that start with "_" for future |
| 82 // use by Chrome. |
| 83 // If any files or directories are found using "_" prefix and are not on |
| 84 // reserved list we return false, and set error message. |
| 85 bool CheckForIllegalFilenames(const FilePath& extension_path, |
| 86 std::string* error); |
| 87 |
| 81 } // extension_file_util | 88 } // extension_file_util |
| 82 | 89 |
| 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| OLD | NEW |