Index: delta_performer.h |
diff --git a/delta_performer.h b/delta_performer.h |
index 0e3cb93aea18c8e3686894af6de4614f2b13c1eb..861b9a01b5c5075ca2240e3f91de1934d67e7f25 100644 |
--- a/delta_performer.h |
+++ b/delta_performer.h |
@@ -34,9 +34,7 @@ class DeltaPerformer : public FileWriter { |
next_operation_num_(0), |
buffer_offset_(0), |
last_updated_buffer_offset_(kuint64max), |
- block_size_(0), |
- current_kernel_hash_(NULL), |
- current_rootfs_hash_(NULL) {} |
+ block_size_(0) {} |
// Opens the kernel. Should be called before or after Open(), but before |
// Write(). The kernel file will be close()d when Close() is called. |
@@ -65,10 +63,14 @@ class DeltaPerformer : public FileWriter { |
const std::string& update_check_response_hash, |
const uint64_t update_check_response_size); |
- // Verifies that the generated update is correct based on the hashes sent by |
- // the server. Returns true on success, false otherwise. |
- bool VerifyAppliedUpdate(const std::string& path, |
- const std::string& kernel_path); |
+ // Reads from the update manifest the expected sizes and hashes of the target |
+ // kernel and rootfs partitions. These values can be used for applied update |
+ // hash verification. This method must be called after the update manifest has |
+ // been parsed (e.g., after closing the stream). |
adlr
2010/12/07 02:22:20
explain return value?
petkov
2010/12/07 17:34:02
Done.
|
+ bool GetNewPartitionInfo(uint64_t* kernel_size, |
+ std::vector<char>* kernel_hash, |
+ uint64_t* rootfs_size, |
+ std::vector<char>* rootfs_hash); |
// Converts an ordered collection of Extent objects which contain data of |
// length full_length to a comma-separated string. For each Extent, the |
@@ -96,11 +98,11 @@ class DeltaPerformer : public FileWriter { |
// success, false otherwise. |
static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick); |
- void set_current_kernel_hash(const std::vector<char>* hash) { |
+ void set_current_kernel_hash(const std::vector<char> hash) { |
adlr
2010/12/07 02:22:20
s/>/>&/
petkov
2010/12/07 17:34:02
Duh.. Done.
|
current_kernel_hash_ = hash; |
} |
- void set_current_rootfs_hash(const std::vector<char>* hash) { |
+ void set_current_rootfs_hash(const std::vector<char> hash) { |
adlr
2010/12/07 02:22:20
s/>/>&/
petkov
2010/12/07 17:34:02
Done.
|
current_rootfs_hash_ = hash; |
} |
@@ -199,8 +201,8 @@ class DeltaPerformer : public FileWriter { |
// Hashes for the current partitions to be used for source partition |
// verification. |
- const std::vector<char>* current_kernel_hash_; |
- const std::vector<char>* current_rootfs_hash_; |
+ std::vector<char> current_kernel_hash_; |
+ std::vector<char> current_rootfs_hash_; |
DISALLOW_COPY_AND_ASSIGN(DeltaPerformer); |
}; |