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

Unified Diff: extensions/common/file_util.cc

Issue 1537473003: Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ultimate weirdness 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
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) {

Powered by Google App Engine
This is Rietveld 408576698