AU: Implement server-dictated poll interval.

The server will need to include a PollInterval XML attribute in its
update check response. The requested interval is in seconds.

BUG=5984
TEST=unit tests, gmerged on device and tested with a modified dev server

Change-Id: I89d13f9f85d93bc141b74ae677cca813e3364fb5

Review URL: http://codereview.chromium.org/3275006
diff --git a/update_check_scheduler.h b/update_check_scheduler.h
index 7253c5a..e3158ed 100644
--- a/update_check_scheduler.h
+++ b/update_check_scheduler.h
@@ -49,10 +49,14 @@
   // Sets the new update status. This is invoked by UpdateAttempter.
   void SetUpdateStatus(UpdateStatus status);
 
+  void set_poll_interval(int interval) { poll_interval_ = interval; }
+
  private:
   friend class UpdateCheckSchedulerTest;
   FRIEND_TEST(UpdateCheckSchedulerTest, CanScheduleTest);
   FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzBackoffTest);
+  FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPollTest);
+  FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPriorityTest);
   FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzTest);
   FRIEND_TEST(UpdateCheckSchedulerTest, GTimeoutAddSecondsTest);
   FRIEND_TEST(UpdateCheckSchedulerTest, IsBootDeviceRemovableTest);
@@ -110,6 +114,9 @@
   // The timeout interval (before fuzzing) for the last update check.
   int last_interval_;
 
+  // Server dictated poll interval in seconds, if positive.
+  int poll_interval_;
+
   DISALLOW_COPY_AND_ASSIGN(UpdateCheckScheduler);
 };