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

Side by Side Diff: update_check_scheduler.cc

Issue 6836025: Add support to update_engine to poke Omaha after an update has been applied (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Fixed bug where last ping day was not properly updated Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« update_attempter_unittest.cc ('K') | « update_check_scheduler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "update_engine/update_check_scheduler.h" 5 #include "update_engine/update_check_scheduler.h"
6 6
7 #include "update_engine/utils.h" 7 #include "update_engine/utils.h"
8 8
9 namespace chromeos_update_engine { 9 namespace chromeos_update_engine {
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 *next_fuzz = fuzz; 130 *next_fuzz = fuzz;
131 } 131 }
132 132
133 void UpdateCheckScheduler::ScheduleNextCheck() { 133 void UpdateCheckScheduler::ScheduleNextCheck() {
134 int interval, fuzz; 134 int interval, fuzz;
135 ComputeNextIntervalAndFuzz(&interval, &fuzz); 135 ComputeNextIntervalAndFuzz(&interval, &fuzz);
136 ScheduleCheck(interval, fuzz); 136 ScheduleCheck(interval, fuzz);
137 } 137 }
138 138
139 void UpdateCheckScheduler::SetUpdateStatus(UpdateStatus status) { 139 void UpdateCheckScheduler::SetUpdateStatus(UpdateStatus status) {
140 if (status == UPDATE_STATUS_IDLE) { 140 // We want to schedule the update checks for when we're idle as well as
141 // after we've successfully applied an update and waiting for the user
142 // to reboot to ensure our active count is accurate.
143 if (status == UPDATE_STATUS_IDLE ||
144 status == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
141 ScheduleNextCheck(); 145 ScheduleNextCheck();
142 } 146 }
143 } 147 }
144 148
145 } // namespace chromeos_update_engine 149 } // namespace chromeos_update_engine
OLDNEW
« update_attempter_unittest.cc ('K') | « update_check_scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698