Fix/extend unit test related functionality.

* Adds mock methods to UpdateAttempterMock and turning corresponding
  base methods into a virtual (needed for subsequent unit testing).

* Adds a setter to OmahaRequestParams.

* Limited general cleanup.

BUG=chromium:346914
TEST=Unit tests.

Change-Id: I0519ad5c43ddebabc1aff6585cf43a290a2081dc
Reviewed-on: https://chromium-review.googlesource.com/192660
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/update_attempter.h b/update_attempter.h
index dfde4ff..20b0173 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -100,11 +100,11 @@
   bool ResetStatus();
 
   // Returns the current status in the out params. Returns true on success.
-  bool GetStatus(int64_t* last_checked_time,
-                 double* progress,
-                 std::string* current_operation,
-                 std::string* new_version,
-                 int64_t* new_size);
+  virtual bool GetStatus(int64_t* last_checked_time,
+                         double* progress,
+                         std::string* current_operation,
+                         std::string* new_version,
+                         int64_t* new_size);
 
   // Runs chromeos-setgoodkernel, whose responsibility it is to mark the
   // currently booted partition has high priority/permanent/etc. The execution
@@ -192,7 +192,7 @@
 
   // Returns the boottime (CLOCK_BOOTTIME) recorded at the last
   // successful update. Returns false if the device has not updated.
-  bool GetBootTimeAtUpdate(base::Time *out_boot_time);
+  virtual bool GetBootTimeAtUpdate(base::Time *out_boot_time);
 
   // Returns a version OS version that was being used before the last reboot,
   // and if that reboot happended to be into an update (current version).