| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 const base::FilePath& root); | 136 const base::FilePath& root); |
| 137 | 137 |
| 138 // Returns a path to a temporary directory for unpacking an extension that will | 138 // Returns a path to a temporary directory for unpacking an extension that will |
| 139 // be installed into |extensions_dir|. Creates the directory if necessary. | 139 // be installed into |extensions_dir|. Creates the directory if necessary. |
| 140 // The directory will be on the same file system as |extensions_dir| so | 140 // The directory will be on the same file system as |extensions_dir| so |
| 141 // that the extension directory can be efficiently renamed into place. Returns | 141 // that the extension directory can be efficiently renamed into place. Returns |
| 142 // an empty file path on failure. | 142 // an empty file path on failure. |
| 143 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir); | 143 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir); |
| 144 | 144 |
| 145 // Helper function to delete files. This is used to avoid ugly casts which | 145 // Helper function to delete files. This is used to avoid ugly casts which |
| 146 // would be necessary with PostMessage since file_util::Delete is overloaded. | 146 // 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. | 147 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. |
| 148 void DeleteFile(const base::FilePath& path, bool recursive); | 148 void DeleteFile(const base::FilePath& path, bool recursive); |
| 149 | 149 |
| 150 } // namespace extension_file_util | 150 } // namespace extension_file_util |
| 151 | 151 |
| 152 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 152 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| OLD | NEW |