| Index: extensions/common/file_util.cc
|
| diff --git a/extensions/common/file_util.cc b/extensions/common/file_util.cc
|
| index a187378b2a431b6c4b7bc8a5afcae746c6bc5302..a42bdae7c2cad0a29389e920ba8f6ec83488be01 100644
|
| --- a/extensions/common/file_util.cc
|
| +++ b/extensions/common/file_util.cc
|
| @@ -52,18 +52,6 @@ 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 size = 0;
|
| - if (!base::PathExists(path) ||
|
| - !base::GetFileSize(path, &size) ||
|
| - size == 0) {
|
| - return false;
|
| - }
|
| -
|
| - return true;
|
| -}
|
| -
|
| // Returns true if the extension installation should flush all files and the
|
| // directory.
|
| bool UseSafeInstallation() {
|
| @@ -271,6 +259,11 @@ scoped_ptr<base::DictionaryValue> LoadManifest(
|
| return base::DictionaryValue::From(std::move(root));
|
| }
|
|
|
| +bool ValidateFilePath(const base::FilePath& path) {
|
| + int64 size = 0;
|
| + return base::PathExists(path) && base::GetFileSize(path, &size) && size != 0;
|
| +}
|
| +
|
| bool ValidateExtension(const Extension* extension,
|
| std::string* error,
|
| std::vector<InstallWarning>* warnings) {
|
|
|