diff options
Diffstat (limited to 'chrome/browser/extensions/extension_creator.h')
-rw-r--r-- | chrome/browser/extensions/extension_creator.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/chrome/browser/extensions/extension_creator.h b/chrome/browser/extensions/extension_creator.h index 86243ba..de7aa76 100644 --- a/chrome/browser/extensions/extension_creator.h +++ b/chrome/browser/extensions/extension_creator.h @@ -10,12 +10,14 @@ #include "base/basictypes.h" +namespace base { +class FilePath; +} + namespace crypto { class RSAPrivateKey; } -class FilePath; - namespace extensions { // This class create an installable extension (.crx file) given an input @@ -37,10 +39,10 @@ class ExtensionCreator { // Categories of error that may need special handling on the UI end. enum ErrorType { kOtherError, kCRXExists }; - bool Run(const FilePath& extension_dir, - const FilePath& crx_path, - const FilePath& private_key_path, - const FilePath& private_key_output_path, + bool Run(const base::FilePath& extension_dir, + const base::FilePath& crx_path, + const base::FilePath& private_key_path, + const base::FilePath& private_key_output_path, int run_flags); // Returns the error message that will be present if Run(...) returned false. @@ -56,38 +58,38 @@ class ExtensionCreator { // the extension. If not provided, a random key will be created (in which case // it is written to |private_key_output_path| -- if provided). // |flags| is a bitset of RunFlags values. - bool InitializeInput(const FilePath& extension_dir, - const FilePath& crx_path, - const FilePath& private_key_path, - const FilePath& private_key_output_path, + bool InitializeInput(const base::FilePath& extension_dir, + const base::FilePath& crx_path, + const base::FilePath& private_key_path, + const base::FilePath& private_key_output_path, int run_flags); // Validates the manifest by trying to load the extension. - bool ValidateManifest(const FilePath& extension_dir, + bool ValidateManifest(const base::FilePath& extension_dir, crypto::RSAPrivateKey* key_pair, int run_flags); // Reads private key from |private_key_path|. - crypto::RSAPrivateKey* ReadInputKey(const FilePath& private_key_path); + crypto::RSAPrivateKey* ReadInputKey(const base::FilePath& private_key_path); // Generates a key pair and writes the private key to |private_key_path| // if provided. - crypto::RSAPrivateKey* GenerateKey(const FilePath& private_key_path); + crypto::RSAPrivateKey* GenerateKey(const base::FilePath& private_key_path); // Creates temporary zip file for the extension. - bool CreateZip(const FilePath& extension_dir, const FilePath& temp_path, - FilePath* zip_path); + bool CreateZip(const base::FilePath& extension_dir, const base::FilePath& temp_path, + base::FilePath* zip_path); // Signs the temporary zip and returns the signature. - bool SignZip(const FilePath& zip_path, + bool SignZip(const base::FilePath& zip_path, crypto::RSAPrivateKey* private_key, std::vector<uint8>* signature); // Export installable .crx to |crx_path|. - bool WriteCRX(const FilePath& zip_path, + bool WriteCRX(const base::FilePath& zip_path, crypto::RSAPrivateKey* private_key, const std::vector<uint8>& signature, - const FilePath& crx_path); + const base::FilePath& crx_path); // Holds a message for any error that is raised during Run(...). std::string error_message_; |