summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_file_util.h
diff options
context:
space:
mode:
authorcira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 20:45:14 +0000
committercira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 20:45:14 +0000
commit300cc58db6bc8d78e279dc07c46f15d9702148c6 (patch)
tree01eb9d8585bc43b01850c226bc4d5f2a3ec00cea /chrome/browser/extensions/extension_file_util.h
parentcceaf1fbf3f4963c59a49268217f1e3edfb372ef (diff)
downloadchromium_src-300cc58db6bc8d78e279dc07c46f15d9702148c6.zip
chromium_src-300cc58db6bc8d78e279dc07c46f15d9702148c6.tar.gz
chromium_src-300cc58db6bc8d78e279dc07c46f15d9702148c6.tar.bz2
This change enables Chrome to load locale information for the extension. It detects default locale, and filters out all locales not supported
by Chrome or with invalid names/missing messages. It also checks for folders that start with _ and are not in the reserved list. We don't validate messages file with this CL. Added support for loading supplied locale information to the extension_file_util, and detecting default locale. Added new constants to extension class (_locales directory name, messages filename). Added new error messages to _constants. Added new unittests. BUG=12131 TEST=There should be no visible changes, except in case of error when loading extension (e.g. create empty _locales folder and try loading). Review URL: http://codereview.chromium.org/170015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_file_util.h')
-rw-r--r--chrome/browser/extensions/extension_file_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_file_util.h b/chrome/browser/extensions/extension_file_util.h
index 45d0b30..c2eb5c9 100644
--- a/chrome/browser/extensions/extension_file_util.h
+++ b/chrome/browser/extensions/extension_file_util.h
@@ -78,6 +78,13 @@ void UninstallExtension(const std::string& id, const FilePath& extensions_dir);
// removing others?
void GarbageCollectExtensions(const FilePath& extensions_dir);
+// We need to reserve the namespace of entries that start with "_" for future
+// use by Chrome.
+// If any files or directories are found using "_" prefix and are not on
+// reserved list we return false, and set error message.
+bool CheckForIllegalFilenames(const FilePath& extension_path,
+ std::string* error);
+
} // extension_file_util
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_