diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 02:56:41 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 02:56:41 +0000 |
commit | a17f946fe4acf8bef67945d76931c14607e8e404 (patch) | |
tree | e785b129ec283de54f944bced5570f347a071b49 /chrome/common/extensions/extension.h | |
parent | c0e0ee4d9be9a9a682210ff1c7853e9f1f8e3770 (diff) | |
download | chromium_src-a17f946fe4acf8bef67945d76931c14607e8e404.zip chromium_src-a17f946fe4acf8bef67945d76931c14607e8e404.tar.gz chromium_src-a17f946fe4acf8bef67945d76931c14607e8e404.tar.bz2 |
chrome.exe --package-extension generates .crx from extension directory
R=aa
BUG=12114
Review URL: http://codereview.chromium.org/118328
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension.h')
-rw-r--r-- | chrome/common/extensions/extension.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 245d7b6..9a5bfbf 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -48,6 +48,7 @@ class Extension { static const char kManifestFilename[]; // Keys used in JSON representation of extensions. + static const wchar_t* kBackgroundKey; static const wchar_t* kContentScriptsKey; static const wchar_t* kCssKey; static const wchar_t* kDescriptionKey; @@ -61,8 +62,8 @@ class Extension { static const wchar_t* kPluginsKey; static const wchar_t* kPluginsPathKey; static const wchar_t* kPluginsPublicKey; - - static const wchar_t* kBackgroundKey; + static const wchar_t* kPublicKeyKey; + static const wchar_t* kSignatureKey; static const wchar_t* kRunAtKey; static const wchar_t* kThemeKey; static const wchar_t* kThemeImagesKey; @@ -73,7 +74,6 @@ class Extension { static const wchar_t* kTooltipKey; static const wchar_t* kTypeKey; static const wchar_t* kVersionKey; - static const wchar_t* kZipHashKey; // Some values expected in manifests. static const char* kRunAtDocumentStartValue; @@ -164,6 +164,20 @@ class Extension { return GetResourcePath(path(), relative_path); } + // |input| is expected to be the text of an rsa public or private key. It + // tolerates the presence or absence of bracking header/footer like this: + // -----(BEGIN|END) [RSA PUBLIC/PRIVATE] KEY----- + // and may contain newlines. + static bool ParsePEMKeyBytes(const std::string& input, std::string* output); + + // Does a simple base64 encoding of |input| into |output|. + static bool ProducePEM(const std::string& input, std::string* output); + + // Expects base64 encoded |input| and formats into |output| including + // the appropriate header & footer. + static bool FormatPEMForFileOutput(const std::string input, + std::string* output, bool is_public); + // Initialize the extension from a parsed manifest. // If |require_id| is true, will return an error if the "id" key is missing // from the value. |