| Index: extensions/common/file_util.cc
|
| diff --git a/extensions/common/file_util.cc b/extensions/common/file_util.cc
|
| index 3ddf6d0e402c7830ddd368a350012fc7b71accac..ae12f2ca6d527fb2940499d9e08bfb24b130a1a9 100644
|
| --- a/extensions/common/file_util.cc
|
| +++ b/extensions/common/file_util.cc
|
| @@ -56,6 +56,12 @@ enum SafeInstallationFlag {
|
| };
|
| SafeInstallationFlag g_use_safe_installation = DEFAULT;
|
|
|
| +// Returns true if the given file path exists and is not zero-length.
|
| +bool ValidateFilePath(const base::FilePath& path) {
|
| + int64_t size = 0;
|
| + return base::PathExists(path) && base::GetFileSize(path, &size) && size != 0;
|
| +}
|
| +
|
| // Returns true if the extension installation should flush all files and the
|
| // directory.
|
| bool UseSafeInstallation() {
|
| @@ -263,11 +269,6 @@ scoped_ptr<base::DictionaryValue> LoadManifest(
|
| return base::DictionaryValue::From(std::move(root));
|
| }
|
|
|
| -bool ValidateFilePath(const base::FilePath& path) {
|
| - int64_t size = 0;
|
| - return base::PathExists(path) && base::GetFileSize(path, &size) && size != 0;
|
| -}
|
| -
|
| bool ValidateExtension(const Extension* extension,
|
| std::string* error,
|
| std::vector<InstallWarning>* warnings) {
|
|
|