| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool ValidateExtension(const extensions::Extension* extension, | 81 bool ValidateExtension(const extensions::Extension* extension, |
| 82 std::string* error, | 82 std::string* error, |
| 83 std::vector<extensions::InstallWarning>* warnings); | 83 std::vector<extensions::InstallWarning>* warnings); |
| 84 | 84 |
| 85 // Returns a list of paths (relative to the extension dir) for images that | 85 // Returns a list of paths (relative to the extension dir) for images that |
| 86 // the browser might load (like themes and page action icons) for the given | 86 // the browser might load (like themes and page action icons) for the given |
| 87 // extension. | 87 // extension. |
| 88 std::set<base::FilePath> GetBrowserImagePaths( | 88 std::set<base::FilePath> GetBrowserImagePaths( |
| 89 const extensions::Extension* extension); | 89 const extensions::Extension* extension); |
| 90 | 90 |
| 91 | |
| 92 // Returns a list of files that contain private keys inside |extension_dir|. | 91 // Returns a list of files that contain private keys inside |extension_dir|. |
| 93 std::vector<base::FilePath> FindPrivateKeyFiles( | 92 std::vector<base::FilePath> FindPrivateKeyFiles( |
| 94 const base::FilePath& extension_dir); | 93 const base::FilePath& extension_dir); |
| 95 | 94 |
| 96 // Cleans up the extension install directory. It can end up with garbage in it | 95 // Cleans up the extension install directory. It can end up with garbage in it |
| 97 // if extensions can't initially be removed when they are uninstalled (eg if a | 96 // if extensions can't initially be removed when they are uninstalled (eg if a |
| 98 // file is in use). | 97 // file is in use). |
| 99 // | 98 // |
| 100 // |extensions_dir| is the install directory to look in. |extension_paths| is a | 99 // |extensions_dir| is the install directory to look in. |extension_paths| is a |
| 101 // map from extension id to full installation path. | 100 // map from extension id to full installation path. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir); | 142 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir); |
| 144 | 143 |
| 145 // Helper function to delete files. This is used to avoid ugly casts which | 144 // Helper function to delete files. This is used to avoid ugly casts which |
| 146 // would be necessary with PostMessage since base::Delete is overloaded. | 145 // would be necessary with PostMessage since base::Delete is overloaded. |
| 147 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. | 146 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. |
| 148 void DeleteFile(const base::FilePath& path, bool recursive); | 147 void DeleteFile(const base::FilePath& path, bool recursive); |
| 149 | 148 |
| 150 } // namespace extension_file_util | 149 } // namespace extension_file_util |
| 151 | 150 |
| 152 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 151 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| OLD | NEW |