diff options
author | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-26 04:11:54 +0000 |
---|---|---|
committer | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-26 04:11:54 +0000 |
commit | 0bfd24108516402718de4aa7aaf0edc3331ae0a1 (patch) | |
tree | c9c47dc129f66162881a045b93dee490e19263de /extensions | |
parent | e0f4c0c8127f3269ff613383a206ec4335f1d3b9 (diff) | |
download | chromium_src-0bfd24108516402718de4aa7aaf0edc3331ae0a1.zip chromium_src-0bfd24108516402718de4aa7aaf0edc3331ae0a1.tar.gz chromium_src-0bfd24108516402718de4aa7aaf0edc3331ae0a1.tar.bz2 |
Provide script/gypi support for manifest generation
This provides a gypi action including well-defined variables, a python script, and a first client in ChromeVox (main and guest).
This generation code was born out of necessity as ChromeVox evolves and requires a varying set of manifests depending on such factors as compression strategy, debug/release builds, Chrome webstore releases, and ChromeVox next (version).
Review URL: https://codereview.chromium.org/295123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/common/file_util.cc | 9 | ||||
-rw-r--r-- | extensions/common/file_util.h | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/extensions/common/file_util.cc b/extensions/common/file_util.cc index 0a116ad..8f025db 100644 --- a/extensions/common/file_util.cc +++ b/extensions/common/file_util.cc @@ -155,7 +155,14 @@ scoped_refptr<Extension> LoadExtension(const base::FilePath& extension_path, base::DictionaryValue* LoadManifest(const base::FilePath& extension_path, std::string* error) { - base::FilePath manifest_path = extension_path.Append(kManifestFilename); + return LoadManifest(extension_path, kManifestFilename, error); +} + +base::DictionaryValue* LoadManifest( + const base::FilePath& extension_path, + const base::FilePath::CharType* manifest_filename, + std::string* error) { + base::FilePath manifest_path = extension_path.Append(manifest_filename); if (!base::PathExists(manifest_path)) { *error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_UNREADABLE); return NULL; diff --git a/extensions/common/file_util.h b/extensions/common/file_util.h index 32c370e..fbf77b2 100644 --- a/extensions/common/file_util.h +++ b/extensions/common/file_util.h @@ -61,6 +61,12 @@ scoped_refptr<Extension> LoadExtension(const base::FilePath& extension_root, base::DictionaryValue* LoadManifest(const base::FilePath& extension_root, std::string* error); +// Convenience overload for specifying a manifest filename. +base::DictionaryValue* LoadManifest( + const base::FilePath& extension_root, + const base::FilePath::CharType* manifest_filename, + std::string* error); + // Returns true if the given extension object is valid and consistent. // May also append a series of warning messages to |warnings|, but they // should not prevent the extension from running. |