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/download_action.cc b/download_action.cc
index b88e448..2920d16 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -147,6 +147,11 @@
         LOG(ERROR) << "Download of " << install_plan_.download_url
                    << " failed due to payload verification error.";
         code = kActionCodeDownloadPayloadVerificationError;
+      } else if (!delta_performer_->VerifyAppliedUpdate(
+          install_plan_.install_path, install_plan_.kernel_install_path)) {
+        LOG(ERROR) << "Download of " << install_plan_.download_url
+                   << " failed due to applied update verification error.";
+        code = kActionCodeDownloadAppliedUpdateVerificationError;
       }
     } else {
       // Makes sure the hash and size are correct for an old-style full update.