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

Unified Diff: delta_performer.h

Issue 6265001: AU: Add support for signing of update payloads after they're generated. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: rename function Created 9 years, 11 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 | « delta_diff_generator.cc ('k') | delta_performer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_performer.h
diff --git a/delta_performer.h b/delta_performer.h
index 8a9914d4c77627f612c4ed00f0cb4c351feb2f23..c693333a1ddcd71842027457d1187a2fa2a19e91 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -25,6 +25,12 @@ class PrefsInterface;
class DeltaPerformer : public FileWriter {
public:
+ enum MetadataParseResult {
+ kMetadataParseSuccess,
+ kMetadataParseError,
+ kMetadataParseInsufficientData,
+ };
+
DeltaPerformer(PrefsInterface* prefs)
: prefs_(prefs),
fd_(-1),
@@ -100,6 +106,17 @@ class DeltaPerformer : public FileWriter {
// success, false otherwise.
static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
+ // Attempts to parse the update metadata starting from the beginning of
+ // |payload| into |manifest|. On success, sets |metadata_size| to the total
+ // metadata bytes (including the delta magic and metadata size fields), and
+ // returns kMetadataParseSuccess. Returns kMetadataParseInsufficientData if
+ // more data is needed to parse the complete metadata. Returns
+ // kMetadataParseError if the metadata can't be parsed given the payload.
+ static MetadataParseResult ParsePayloadMetadata(
+ const std::vector<char>& payload,
+ DeltaArchiveManifest* manifest,
+ uint64_t* metadata_size);
+
void set_current_kernel_hash(const std::vector<char>& hash) {
current_kernel_hash_ = hash;
}
« no previous file with comments | « delta_diff_generator.cc ('k') | delta_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698