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.cc b/download_action.cc
index 608eeb9..4462ab8 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -20,8 +20,10 @@
 // Use a buffer to reduce the number of IOPS on SSD devices.
 const size_t kFileWriterBufferSize = 128 * 1024;  // 128 KiB
 
-DownloadAction::DownloadAction(HttpFetcher* http_fetcher)
-    : writer_(NULL),
+DownloadAction::DownloadAction(PrefsInterface* prefs,
+                               HttpFetcher* http_fetcher)
+    : prefs_(prefs),
+      writer_(NULL),
       http_fetcher_(http_fetcher),
       delegate_(NULL),
       bytes_received_(0) {}
@@ -61,7 +63,7 @@
           new GzipDecompressingFileWriter(split_file_writer_.get()));
       writer_ = decompressing_file_writer_.get();
     } else {
-      delta_performer_.reset(new DeltaPerformer);
+      delta_performer_.reset(new DeltaPerformer(prefs_));
       writer_ = delta_performer_.get();
     }
   }