summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_creator.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 20:46:20 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 20:46:20 +0000
commit77384a34070c268779dcf9d6aff3d1e80c6a4d25 (patch)
tree3e27e87c7eda146a32a98bd371a5932d2bc7351a /chrome/browser/extensions/extension_creator.h
parent733251c42033fed1828bfdb38a84e66162b82c33 (diff)
downloadchromium_src-77384a34070c268779dcf9d6aff3d1e80c6a4d25.zip
chromium_src-77384a34070c268779dcf9d6aff3d1e80c6a4d25.tar.gz
chromium_src-77384a34070c268779dcf9d6aff3d1e80c6a4d25.tar.bz2
Revert "BUG=12114"
This reverts commit r18189. TBR=rafaelw Review URL: http://codereview.chromium.org/125004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_creator.h')
-rwxr-xr-xchrome/browser/extensions/extension_creator.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_creator.h b/chrome/browser/extensions/extension_creator.h
index 129e152..febcecd 100755
--- a/chrome/browser/extensions/extension_creator.h
+++ b/chrome/browser/extensions/extension_creator.h
@@ -17,6 +17,28 @@
// generated randomly (and optionally written to |output_private_key_path|.
class ExtensionCreator {
public:
+ // The size of the magic character sequence at the beginning of each crx file,
+ // in bytes. This should be a multiple of 4.
+ static const size_t kExtensionHeaderMagicSize = 4;
+
+ // The magic character sequence at the beginning of each crx file.
+ static const char kExtensionHeaderMagic[];
+
+ // The current version of the crx format.
+ static const uint32 kCurrentVersion = 2;
+
+ // This header is the first data at the beginning of an extension. Its
+ // contents are purposely 32-bit aligned so that it can just be slurped into
+ // a struct without manual parsing.
+ struct ExtensionHeader {
+ char magic[kExtensionHeaderMagicSize];
+ uint32 version;
+ size_t key_size; // The size of the public key, in bytes.
+ size_t signature_size; // The size of the signature, in bytes.
+ // An ASN.1-encoded PublicKeyInfo structure follows.
+ // The signature follows.
+ };
+
ExtensionCreator() {}
bool Run(const FilePath& extension_dir,