Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: chrome/browser/extensions/extension_creator.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixes comments by eroman Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_creator.h ('k') | chrome/browser/extensions/extension_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_creator.cc
===================================================================
--- chrome/browser/extensions/extension_creator.cc (revision 81350)
+++ chrome/browser/extensions/extension_creator.cc (working copy)
@@ -7,12 +7,12 @@
#include <vector>
#include <string>
-#include "base/crypto/rsa_private_key.h"
-#include "base/crypto/signature_creator.h"
#include "base/file_util.h"
#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_temp_dir.h"
#include "base/string_util.h"
+#include "crypto/rsa_private_key.h"
+#include "crypto/signature_creator.h"
#include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
@@ -74,7 +74,7 @@
return true;
}
-base::RSAPrivateKey* ExtensionCreator::ReadInputKey(const FilePath&
+crypto::RSAPrivateKey* ExtensionCreator::ReadInputKey(const FilePath&
private_key_path) {
if (!file_util::PathExists(private_key_path)) {
error_message_ =
@@ -98,14 +98,14 @@
return NULL;
}
- return base::RSAPrivateKey::CreateFromPrivateKeyInfo(
+ return crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(
std::vector<uint8>(private_key_bytes.begin(), private_key_bytes.end()));
}
-base::RSAPrivateKey* ExtensionCreator::GenerateKey(const FilePath&
+crypto::RSAPrivateKey* ExtensionCreator::GenerateKey(const FilePath&
output_private_key_path) {
- scoped_ptr<base::RSAPrivateKey> key_pair(
- base::RSAPrivateKey::Create(kRSAKeySize));
+ scoped_ptr<crypto::RSAPrivateKey> key_pair(
+ crypto::RSAPrivateKey::Create(kRSAKeySize));
if (!key_pair.get()) {
error_message_ =
l10n_util::GetStringUTF8(IDS_EXTENSION_PRIVATE_KEY_FAILED_TO_GENERATE);
@@ -163,10 +163,10 @@
}
bool ExtensionCreator::SignZip(const FilePath& zip_path,
- base::RSAPrivateKey* private_key,
+ crypto::RSAPrivateKey* private_key,
std::vector<uint8>* signature) {
- scoped_ptr<base::SignatureCreator> signature_creator(
- base::SignatureCreator::Create(private_key));
+ scoped_ptr<crypto::SignatureCreator> signature_creator(
+ crypto::SignatureCreator::Create(private_key));
ScopedStdioHandle zip_handle(file_util::OpenFile(zip_path, "rb"));
size_t buffer_size = 1 << 16;
scoped_array<uint8> buffer(new uint8[buffer_size]);
@@ -186,7 +186,7 @@
}
bool ExtensionCreator::WriteCRX(const FilePath& zip_path,
- base::RSAPrivateKey* private_key,
+ crypto::RSAPrivateKey* private_key,
const std::vector<uint8>& signature,
const FilePath& crx_path) {
if (file_util::PathExists(crx_path))
@@ -246,7 +246,7 @@
}
// Initialize Key Pair
- scoped_ptr<base::RSAPrivateKey> key_pair;
+ scoped_ptr<crypto::RSAPrivateKey> key_pair;
if (!private_key_path.value().empty())
key_pair.reset(ReadInputKey(private_key_path));
else
« no previous file with comments | « chrome/browser/extensions/extension_creator.h ('k') | chrome/browser/extensions/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698