AU: Beginnings of delta support
- proto file for delta files; still needs hardlink support
- code to generate a delta update from two directory trees (old, new).
- code to parse delta update
- Actions: postinst-runner, install, bootable flag setter, filesystem
copier, Omaha response handler, Omaha request preparer,
- misc utility functions, like StringHasSuffix(), templatized Action
classes to feed/collect an object from another action.
- FilesystemIterator: iterates a directory tree with optional
exclusion path. Tolerates deleting of files during iteration.
- Subprocess class: support for synchronously or asynchronously
running an external command. Doesn't pass any env variables.
- Integration test that strings many Actions together and tests using
actual Omaha/Lorry. Currently only tests full updates.
- New simple HTTP server for unittest that supports fake flaky
connections.
- Some refactoring.
Review URL: http://codereview.chromium.org/466036
git-svn-id: svn://chrome-svn/chromeos/trunk@334 06c00378-0e64-4dae-be16-12b19f9950a1
diff --git a/omaha_hash_calculator.cc b/omaha_hash_calculator.cc
index 2ef0f97..93b3d9e 100644
--- a/omaha_hash_calculator.cc
+++ b/omaha_hash_calculator.cc
@@ -5,13 +5,13 @@
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/evp.h>
-#include "base/logging.h"
+#include "chromeos/obsolete_logging.h"
#include "update_engine/omaha_hash_calculator.h"
namespace chromeos_update_engine {
OmahaHashCalculator::OmahaHashCalculator() {
- CHECK_EQ(1, SHA1_Init(&ctx_));
+ CHECK_EQ(SHA1_Init(&ctx_), 1);
}
// Update is called with all of the data that should be hashed in order.
@@ -20,7 +20,7 @@
CHECK(hash_.empty()) << "Can't Update after hash is finalized";
COMPILE_ASSERT(sizeof(size_t) <= sizeof(unsigned long),
length_param_may_be_truncated_in_SHA1_Update);
- CHECK_EQ(1, SHA1_Update(&ctx_, data, length));
+ CHECK_EQ(SHA1_Update(&ctx_, data, length), 1);
}
// Call Finalize() when all data has been passed in. This mostly just
@@ -28,7 +28,7 @@
void OmahaHashCalculator::Finalize() {
CHECK(hash_.empty()) << "Don't call Finalize() twice";
unsigned char md[SHA_DIGEST_LENGTH];
- CHECK_EQ(1, SHA1_Final(md, &ctx_));
+ CHECK_EQ(SHA1_Final(md, &ctx_), 1);
// Convert md to base64 encoding and store it in hash_
BIO *b64 = BIO_new(BIO_f_base64());
@@ -36,8 +36,8 @@
BIO *bmem = BIO_new(BIO_s_mem());
CHECK(bmem);
b64 = BIO_push(b64, bmem);
- CHECK_EQ(sizeof(md), BIO_write(b64, md, sizeof(md)));
- CHECK_EQ(1, BIO_flush(b64));
+ CHECK_EQ(BIO_write(b64, md, sizeof(md)), sizeof(md));
+ CHECK_EQ(BIO_flush(b64), 1);
BUF_MEM *bptr = NULL;
BIO_get_mem_ptr(b64, &bptr);