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

Unified Diff: chrome/browser/component_updater/component_unpacker.cc

Issue 474633005: Componentize component_updater: Split crx_file code off into its own component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove shared library export Created 6 years, 4 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
Index: chrome/browser/component_updater/component_unpacker.cc
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc
index 67c66162e826bb8c47a1161bf5deb96caae1e543..74e8a8e6a842575b7c0dc21dd7ddd5bf1decf530 100644
--- a/chrome/browser/component_updater/component_unpacker.cc
+++ b/chrome/browser/component_updater/component_unpacker.cc
@@ -20,10 +20,10 @@
#include "chrome/browser/component_updater/component_patcher.h"
#include "chrome/browser/component_updater/component_patcher_operation.h"
#include "chrome/browser/component_updater/component_updater_service.h"
+#include "components/crx_file/constants.h"
+#include "components/crx_file/crx_file.h"
#include "crypto/secure_hash.h"
#include "crypto/signature_verifier.h"
-#include "extensions/common/constants.h"
-#include "extensions/common/crx_file.h"
#include "third_party/zlib/google/zip.h"
using crypto::SecureHash;
@@ -37,17 +37,17 @@ namespace {
class CRXValidator {
public:
explicit CRXValidator(FILE* crx_file) : valid_(false), is_delta_(false) {
- extensions::CrxFile::Header header;
+ crx_file::CrxFile::Header header;
size_t len = fread(&header, 1, sizeof(header), crx_file);
if (len < sizeof(header))
return;
- extensions::CrxFile::Error error;
- scoped_ptr<extensions::CrxFile> crx(
- extensions::CrxFile::Parse(header, &error));
+ crx_file::CrxFile::Error error;
+ scoped_ptr<crx_file::CrxFile> crx(
+ crx_file::CrxFile::Parse(header, &error));
if (!crx.get())
return;
- is_delta_ = extensions::CrxFile::HeaderIsDelta(header);
+ is_delta_ = crx_file::CrxFile::HeaderIsDelta(header);
std::vector<uint8> key(header.key_size);
len = fread(&key[0], sizeof(uint8), header.key_size, crx_file);
@@ -60,8 +60,8 @@ class CRXValidator {
return;
crypto::SignatureVerifier verifier;
- if (!verifier.VerifyInit(extension_misc::kSignatureAlgorithm,
- sizeof(extension_misc::kSignatureAlgorithm),
+ if (!verifier.VerifyInit(crx_file::kSignatureAlgorithm,
+ sizeof(crx_file::kSignatureAlgorithm),
&signature[0],
signature.size(),
&key[0],

Powered by Google App Engine
This is Rietveld 408576698