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

Unified Diff: chrome/browser/extensions/extension_file_util.h

Issue 202063: Implemented the rest of loading/parsing logic for extension i18n:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months 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 | « no previous file | chrome/browser/extensions/extension_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_file_util.h
===================================================================
--- chrome/browser/extensions/extension_file_util.h (revision 25781)
+++ chrome/browser/extensions/extension_file_util.h (working copy)
@@ -11,6 +11,8 @@
#include "base/file_path.h"
#include "chrome/common/extensions/extension.h"
+class ExtensionMessageBundle;
+
// Utilties for manipulating the on-disk storage of extensions.
namespace extension_file_util {
@@ -28,7 +30,8 @@
bool MoveDirSafely(const FilePath& source_dir, const FilePath& dest_dir);
// Updates the Current Version file inside the installed extension.
-bool SetCurrentVersion(const FilePath& dest_dir, const std::string& version,
+bool SetCurrentVersion(const FilePath& dest_dir,
+ const std::string& version,
std::string* error);
// Reads the Current Version file.
@@ -66,7 +69,8 @@
// Loads and validates an extension from the specified directory. Returns NULL
// on failure, with a description of the error in |error|.
-Extension* LoadExtension(const FilePath& extension_root, bool require_key,
+Extension* LoadExtension(const FilePath& extension_root,
+ bool require_key,
std::string* error);
// Returns true if the given extension object is valid and consistent.
@@ -82,6 +86,14 @@
void GarbageCollectExtensions(const FilePath& extensions_dir,
const std::set<std::string>& installed_ids);
+// Loads locale information if _locales folder is present.
+// Returns message bundle if there were no errors. If _locales folder is not
+// present it returns NULL with empty error string.
+// Loading failed only if function returns NULL and error is not empty.
+ExtensionMessageBundle* LoadLocaleInfo(const FilePath& extension_path,
+ const DictionaryValue& manifest,
+ std::string* error);
+
// 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698