update_engine: add staging pref to payload_state

Add kPrefsWallClockStagingWaitPeriod as a new pref so that the staging
wait period persists accross reboots. Change the old
kPrefsWallClockWaitPeriod constant to
kPrefsWallClockScatteringWaitPeriod to differentiate more clearly
between the two.

BUG=chromium:858621
TEST=cros_workon_make update_engine --test

Change-Id: Ifc6aeb44271321cdd2f0d4cfa583a7bbc32b9004
Reviewed-on: https://chromium-review.googlesource.com/1138741
Commit-Ready: Adolfo Higueros <adokar@google.com>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: May Lippert <maybelle@chromium.org>
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 80c9638..eceb02b 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -909,7 +909,8 @@
   fake_system_state_.fake_hardware()->SetIsOOBEComplete(Time::UnixEpoch());
   fake_system_state_.set_prefs(&fake_prefs);
 
-  EXPECT_TRUE(fake_prefs.SetInt64(kPrefsWallClockWaitPeriod, initial_value));
+  EXPECT_TRUE(
+      fake_prefs.SetInt64(kPrefsWallClockScatteringWaitPeriod, initial_value));
   EXPECT_TRUE(fake_prefs.SetInt64(kPrefsUpdateCheckCount, initial_value));
 
   // make sure scatter_factor is non-zero as scattering is disabled
@@ -942,7 +943,7 @@
   // checks and all artifacts are removed.
   EXPECT_FALSE(
       attempter_.omaha_request_params_->wall_clock_based_wait_enabled());
-  EXPECT_FALSE(fake_prefs.Exists(kPrefsWallClockWaitPeriod));
+  EXPECT_FALSE(fake_prefs.Exists(kPrefsWallClockScatteringWaitPeriod));
   EXPECT_EQ(0, attempter_.omaha_request_params_->waiting_period().InSeconds());
   EXPECT_FALSE(
       attempter_.omaha_request_params_->update_check_count_wait_enabled());