| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/screens/update_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 15 #include "chrome/browser/chromeos/cros/network_library.h" | 15 #include "chrome/browser/chromeos/cros/network_library.h" |
| 16 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 16 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 17 #include "chrome/browser/chromeos/login/screens/screen_observer.h" | 17 #include "chrome/browser/chromeos/login/screens/screen_observer.h" |
| 18 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h" | 18 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h" |
| 19 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 19 #include "chrome/browser/chromeos/login/wizard_controller.h" | 20 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 20 #include "chromeos/chromeos_switches.h" | 21 #include "chromeos/chromeos_switches.h" |
| 21 #include "chromeos/dbus/dbus_thread_manager.h" | 22 #include "chromeos/dbus/dbus_thread_manager.h" |
| 22 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 23 | 24 |
| 24 using content::BrowserThread; | 25 using content::BrowserThread; |
| 25 | 26 |
| 26 namespace chromeos { | 27 namespace chromeos { |
| 27 | 28 |
| 28 namespace { | 29 namespace { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 case UpdateEngineClient::UPDATE_STATUS_FINALIZING: | 199 case UpdateEngineClient::UPDATE_STATUS_FINALIZING: |
| 199 MakeSureScreenIsShown(); | 200 MakeSureScreenIsShown(); |
| 200 actor_->SetProgress(kBeforeFinalizingProgress); | 201 actor_->SetProgress(kBeforeFinalizingProgress); |
| 201 actor_->SetProgressMessage( | 202 actor_->SetProgressMessage( |
| 202 UpdateScreenActor::PROGRESS_MESSAGE_FINALIZING); | 203 UpdateScreenActor::PROGRESS_MESSAGE_FINALIZING); |
| 203 actor_->ShowProgressMessage(true); | 204 actor_->ShowProgressMessage(true); |
| 204 break; | 205 break; |
| 205 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: | 206 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: |
| 206 MakeSureScreenIsShown(); | 207 MakeSureScreenIsShown(); |
| 207 // Make sure that first OOBE stage won't be shown after reboot. | 208 // Make sure that first OOBE stage won't be shown after reboot. |
| 208 WizardController::MarkOobeCompleted(); | 209 StartupUtils::MarkOobeCompleted(); |
| 209 actor_->SetProgress(kProgressComplete); | 210 actor_->SetProgress(kProgressComplete); |
| 210 actor_->ShowEstimatedTimeLeft(false); | 211 actor_->ShowEstimatedTimeLeft(false); |
| 211 if (HasCriticalUpdate()) { | 212 if (HasCriticalUpdate()) { |
| 212 actor_->ShowCurtain(false); | 213 actor_->ShowCurtain(false); |
| 213 VLOG(1) << "Initiate reboot after update"; | 214 VLOG(1) << "Initiate reboot after update"; |
| 214 DBusThreadManager::Get()->GetUpdateEngineClient()->RebootAfterUpdate(); | 215 DBusThreadManager::Get()->GetUpdateEngineClient()->RebootAfterUpdate(); |
| 215 reboot_timer_.Start(FROM_HERE, | 216 reboot_timer_.Start(FROM_HERE, |
| 216 base::TimeDelta::FromSeconds(reboot_check_delay_), | 217 base::TimeDelta::FromSeconds(reboot_check_delay_), |
| 217 this, | 218 this, |
| 218 &UpdateScreen::OnWaitForRebootTimeElapsed); | 219 &UpdateScreen::OnWaitForRebootTimeElapsed); |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, | 501 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, |
| 501 std::string()); | 502 std::string()); |
| 502 break; | 503 break; |
| 503 default: | 504 default: |
| 504 NOTREACHED(); | 505 NOTREACHED(); |
| 505 break; | 506 break; |
| 506 } | 507 } |
| 507 } | 508 } |
| 508 | 509 |
| 509 } // namespace chromeos | 510 } // namespace chromeos |
| OLD | NEW |