AU: Start checkpointing update progress.

Checkpoint the manifest metadata size and the update
check response hash in the preference store. Also checkpoint
the next operation and data offset.
Add methods for getting/setting hash context.

BUG=7390,7394
TEST=unit tests

Change-Id: I25291bf598ac9b0f1033e11cfe59df45b1f6eeab

Review URL: http://codereview.chromium.org/3521016
diff --git a/download_action.h b/download_action.h
index f6d5a11..62dd29a 100644
--- a/download_action.h
+++ b/download_action.h
@@ -49,6 +49,7 @@
 
 class DownloadAction;
 class NoneType;
+class PrefsInterface;
 
 template<>
 class ActionTraits<DownloadAction> {
@@ -64,7 +65,7 @@
   // Takes ownership of the passed in HttpFetcher. Useful for testing.
   // A good calling pattern is:
   // DownloadAction(new WhateverHttpFetcher);
-  DownloadAction(HttpFetcher* http_fetcher);
+  DownloadAction(PrefsInterface* prefs, HttpFetcher* http_fetcher);
   virtual ~DownloadAction();
   typedef ActionTraits<DownloadAction>::InputObjectType InputObjectType;
   typedef ActionTraits<DownloadAction>::OutputObjectType OutputObjectType;
@@ -96,6 +97,9 @@
   // The InstallPlan passed in
   InstallPlan install_plan_;
 
+  // Update Engine preference store.
+  PrefsInterface* prefs_;
+
   // The FileWriter that downloaded data should be written to. It will
   // either point to *decompressing_file_writer_ or *delta_performer_.
   FileWriter* writer_;