| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // This is essentially PathService::Get(chrome::DIR_USER_DATA_TEMP, ...), | 123 // This is essentially PathService::Get(chrome::DIR_USER_DATA_TEMP, ...), |
| 124 // with a histogram that allows us to understand why it is failing. | 124 // with a histogram that allows us to understand why it is failing. |
| 125 // Return an empty file path on failure. | 125 // Return an empty file path on failure. |
| 126 FilePath GetUserDataTempDir(); | 126 FilePath GetUserDataTempDir(); |
| 127 | 127 |
| 128 // Helper function to delete files. This is used to avoid ugly casts which | 128 // Helper function to delete files. This is used to avoid ugly casts which |
| 129 // would be necessary with PostMessage since file_util::Delete is overloaded. | 129 // would be necessary with PostMessage since file_util::Delete is overloaded. |
| 130 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. | 130 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. |
| 131 void DeleteFile(const FilePath& path, bool recursive); | 131 void DeleteFile(const FilePath& path, bool recursive); |
| 132 | 132 |
| 133 bool IsComponentExtensionResource(const extensions::Extension* extension, |
| 134 const FilePath& resource_path, |
| 135 int* resource_id); |
| 136 |
| 133 } // namespace extension_file_util | 137 } // namespace extension_file_util |
| 134 | 138 |
| 135 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ | 139 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ |
| OLD | NEW |