Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: update_check_scheduler.h

Issue 3275006: AU: Implement server-dictated poll interval. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: rebase to head Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « update_attempter.cc ('k') | update_check_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_check_scheduler.h
diff --git a/update_check_scheduler.h b/update_check_scheduler.h
index 7253c5a1158cfcff95e359ba872ed4543993ec6f..e3158ed5e2395303bc83f6c2a30a9b8cc82b9908 100644
--- a/update_check_scheduler.h
+++ b/update_check_scheduler.h
@@ -49,10 +49,14 @@ class UpdateCheckScheduler {
// 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 @@ class UpdateCheckScheduler {
// 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);
};
« no previous file with comments | « update_attempter.cc ('k') | update_check_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698