| 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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return instance_set; | 77 return instance_set; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // static | 80 // static |
| 81 bool UpdateScreen::HasInstance(UpdateScreen* inst) { | 81 bool UpdateScreen::HasInstance(UpdateScreen* inst) { |
| 82 InstanceSet& instance_set = GetInstanceSet(); | 82 InstanceSet& instance_set = GetInstanceSet(); |
| 83 InstanceSet::iterator found = instance_set.find(inst); | 83 InstanceSet::iterator found = instance_set.find(inst); |
| 84 return (found != instance_set.end()); | 84 return (found != instance_set.end()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 // static |
| 88 UpdateScreen* UpdateScreen::Get(ScreenManager* manager) { |
| 89 return static_cast<UpdateScreen*>( |
| 90 manager->GetScreen(WizardController::kUpdateScreenName)); |
| 91 } |
| 92 |
| 87 UpdateScreen::UpdateScreen( | 93 UpdateScreen::UpdateScreen( |
| 88 ScreenObserver* screen_observer, | 94 ScreenObserver* screen_observer, |
| 89 UpdateScreenActor* actor) | 95 UpdateScreenActor* actor) |
| 90 : WizardScreen(screen_observer), | 96 : WizardScreen(screen_observer), |
| 91 state_(STATE_IDLE), | 97 state_(STATE_IDLE), |
| 92 reboot_check_delay_(0), | 98 reboot_check_delay_(0), |
| 93 is_checking_for_update_(true), | 99 is_checking_for_update_(true), |
| 94 is_downloading_update_(false), | 100 is_downloading_update_(false), |
| 95 is_ignore_update_deadlines_(false), | 101 is_ignore_update_deadlines_(false), |
| 96 is_shown_(false), | 102 is_shown_(false), |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, | 519 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, |
| 514 std::string()); | 520 std::string()); |
| 515 break; | 521 break; |
| 516 default: | 522 default: |
| 517 NOTREACHED(); | 523 NOTREACHED(); |
| 518 break; | 524 break; |
| 519 } | 525 } |
| 520 } | 526 } |
| 521 | 527 |
| 522 } // namespace chromeos | 528 } // namespace chromeos |
| OLD | NEW |