Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: extensions/common/file_util.cc

Issue 1554583002: Revert of Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge issues Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/file_util.h ('k') | extensions/common/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « extensions/common/file_util.h ('k') | extensions/common/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698