diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 20:16:09 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 20:16:09 +0000 |
commit | 928bfd79b3646f46451f439dd13e0871d97cc20c (patch) | |
tree | 9b1d92f4c54e11e288a1ebfdc2252c819f770b4f /chrome/browser/extensions/extension_creator.cc | |
parent | b17ef85af94338657109d2c85de8c26b88432f89 (diff) | |
download | chromium_src-928bfd79b3646f46451f439dd13e0871d97cc20c.zip chromium_src-928bfd79b3646f46451f439dd13e0871d97cc20c.tar.gz chromium_src-928bfd79b3646f46451f439dd13e0871d97cc20c.tar.bz2 |
BUG=12114
R=erikkay,wtc
Review URL: http://codereview.chromium.org/115682
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_creator.cc')
-rwxr-xr-x | chrome/browser/extensions/extension_creator.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index 8c38e17..9abd030 100755 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -12,6 +12,7 @@ #include "base/file_util.h" #include "base/scoped_handle.h" #include "base/string_util.h" +#include "chrome/browser/extensions/extensions_service.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/zip.h" #include "net/base/base64.h" @@ -20,8 +21,6 @@ namespace { const int kRSAKeySize = 1024; }; -const char ExtensionCreator::kExtensionHeaderMagic[] = "Cr24"; - bool ExtensionCreator::InitializeInput( const FilePath& extension_dir, const FilePath& private_key_path, @@ -167,14 +166,14 @@ bool ExtensionCreator::WriteCRX(const FilePath& zip_path, return false; } - ExtensionCreator::ExtensionHeader header; - memcpy(&header.magic, ExtensionCreator::kExtensionHeaderMagic, - ExtensionCreator::kExtensionHeaderMagicSize); - header.version = kCurrentVersion; + ExtensionsService::ExtensionHeader header; + memcpy(&header.magic, ExtensionsService::kExtensionHeaderMagic, + ExtensionsService::kExtensionHeaderMagicSize); + header.version = ExtensionsService::kCurrentVersion; header.key_size = public_key.size(); header.signature_size = signature.size(); - fwrite(&header, sizeof(ExtensionCreator::ExtensionHeader), 1, + fwrite(&header, sizeof(ExtensionsService::ExtensionHeader), 1, crx_handle.get()); fwrite(&public_key.front(), sizeof(uint8), public_key.size(), crx_handle.get()); |