| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 "chrome/browser/chromeos/login/update_screen.h" | 5 #include "chrome/browser/chromeos/login/update_screen.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 break; | 149 break; |
| 150 case UPDATE_STATUS_UPDATED_NEED_REBOOT: | 150 case UPDATE_STATUS_UPDATED_NEED_REBOOT: |
| 151 MakeSureScreenIsShown(); | 151 MakeSureScreenIsShown(); |
| 152 // Make sure that first OOBE stage won't be shown after reboot. | 152 // Make sure that first OOBE stage won't be shown after reboot. |
| 153 WizardController::MarkOobeCompleted(); | 153 WizardController::MarkOobeCompleted(); |
| 154 actor_->SetProgress(kProgressComplete); | 154 actor_->SetProgress(kProgressComplete); |
| 155 if (HasCriticalUpdate()) { | 155 if (HasCriticalUpdate()) { |
| 156 actor_->ShowCurtain(false); | 156 actor_->ShowCurtain(false); |
| 157 VLOG(1) << "Initiate reboot after update"; | 157 VLOG(1) << "Initiate reboot after update"; |
| 158 CrosLibrary::Get()->GetUpdateLibrary()->RebootAfterUpdate(); | 158 CrosLibrary::Get()->GetUpdateLibrary()->RebootAfterUpdate(); |
| 159 reboot_timer_.Start(FROM_HERE, | 159 reboot_timer_.Start(base::TimeDelta::FromSeconds(reboot_check_delay_), |
| 160 base::TimeDelta::FromSeconds(reboot_check_delay_), | |
| 161 this, | 160 this, |
| 162 &UpdateScreen::OnWaitForRebootTimeElapsed); | 161 &UpdateScreen::OnWaitForRebootTimeElapsed); |
| 163 } else { | 162 } else { |
| 164 ExitUpdate(REASON_UPDATE_NON_CRITICAL); | 163 ExitUpdate(REASON_UPDATE_NON_CRITICAL); |
| 165 } | 164 } |
| 166 break; | 165 break; |
| 167 case UPDATE_STATUS_IDLE: | 166 case UPDATE_STATUS_IDLE: |
| 168 if (ignore_idle_status_) { | 167 if (ignore_idle_status_) { |
| 169 // It is first IDLE status that is sent before we initiated the check. | 168 // It is first IDLE status that is sent before we initiated the check. |
| 170 break; | 169 break; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // if the file exists and not empty, there is critical update. | 296 // if the file exists and not empty, there is critical update. |
| 298 return true; | 297 return true; |
| 299 } | 298 } |
| 300 | 299 |
| 301 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) { | 300 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) { |
| 302 if (actor_ == actor) | 301 if (actor_ == actor) |
| 303 actor_ = NULL; | 302 actor_ = NULL; |
| 304 } | 303 } |
| 305 | 304 |
| 306 } // namespace chromeos | 305 } // namespace chromeos |
| OLD | NEW |