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

Side by Side Diff: update_check_scheduler.cc

Issue 5205002: AU: Manual proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: missed one fix for review Created 10 years 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
« no previous file with comments | « update_attempter_unittest.cc ('k') | update_check_scheduler_unittest.cc » ('j') | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 GTimeoutAddSeconds(interval, StaticCheck); 75 GTimeoutAddSeconds(interval, StaticCheck);
76 scheduled_ = true; 76 scheduled_ = true;
77 LOG(INFO) << "Next update check in " << interval << " seconds."; 77 LOG(INFO) << "Next update check in " << interval << " seconds.";
78 } 78 }
79 79
80 gboolean UpdateCheckScheduler::StaticCheck(void* scheduler) { 80 gboolean UpdateCheckScheduler::StaticCheck(void* scheduler) {
81 UpdateCheckScheduler* me = reinterpret_cast<UpdateCheckScheduler*>(scheduler); 81 UpdateCheckScheduler* me = reinterpret_cast<UpdateCheckScheduler*>(scheduler);
82 CHECK(me->scheduled_); 82 CHECK(me->scheduled_);
83 me->scheduled_ = false; 83 me->scheduled_ = false;
84 if (me->IsOOBEComplete()) { 84 if (me->IsOOBEComplete()) {
85 me->update_attempter_->Update("", ""); 85 me->update_attempter_->Update("", "", false);
86 } else { 86 } else {
87 // Skips all automatic update checks if the OOBE process is not complete and 87 // Skips all automatic update checks if the OOBE process is not complete and
88 // schedules a new check as if it is the first one. 88 // schedules a new check as if it is the first one.
89 LOG(WARNING) << "Skipping update check because OOBE is not complete."; 89 LOG(WARNING) << "Skipping update check because OOBE is not complete.";
90 me->ScheduleCheck(kTimeoutOnce, kTimeoutRegularFuzz); 90 me->ScheduleCheck(kTimeoutOnce, kTimeoutRegularFuzz);
91 } 91 }
92 // This check ensures that future update checks will be or are already 92 // This check ensures that future update checks will be or are already
93 // scheduled. The check should never fail. A check failure means that there's 93 // scheduled. The check should never fail. A check failure means that there's
94 // a bug that will most likely prevent further automatic update checks. It 94 // a bug that will most likely prevent further automatic update checks. It
95 // seems better to crash in such cases and restart the update_engine daemon 95 // seems better to crash in such cases and restart the update_engine daemon
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (status == UPDATE_STATUS_IDLE) {
141 ScheduleNextCheck(); 141 ScheduleNextCheck();
142 } 142 }
143 } 143 }
144 144
145 } // namespace chromeos_update_engine 145 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « update_attempter_unittest.cc ('k') | update_check_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698