AU: Verify that the applied delta update matches the server-sent hashes.

Also, don't try to resume any delta update that fails for any reason
other than download transfer errors.

BUG=7348
TEST=unit tests, gmerged on device

Change-Id: Ice464b8d421256717d7909fd5fa46d762bd48952

Review URL: http://codereview.chromium.org/3599025
diff --git a/delta_performer.h b/delta_performer.h
index 16073d8..7394f94 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -63,6 +63,11 @@
                      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);
+
   // Converts an ordered collection of Extent objects which contain data of
   // length full_length to a comma-separated string. For each Extent, the
   // string will have the start offset and then the length in bytes.