| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
| 14 #include "chrome/browser/chromeos/login/screen_manager.h" |
| 14 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 15 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 15 #include "chrome/browser/chromeos/login/screens/screen_observer.h" | 16 #include "chrome/browser/chromeos/login/screens/screen_observer.h" |
| 16 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h" | 17 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h" |
| 17 #include "chrome/browser/chromeos/login/startup_utils.h" | 18 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 18 #include "chrome/browser/chromeos/login/wizard_controller.h" | 19 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 19 #include "chromeos/dbus/dbus_thread_manager.h" | 20 #include "chromeos/dbus/dbus_thread_manager.h" |
| 20 #include "chromeos/network/network_state.h" | 21 #include "chromeos/network/network_state.h" |
| 21 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 22 | 23 |
| 23 using content::BrowserThread; | 24 using content::BrowserThread; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return instance_set; | 78 return instance_set; |
| 78 } | 79 } |
| 79 | 80 |
| 80 // static | 81 // static |
| 81 bool UpdateScreen::HasInstance(UpdateScreen* inst) { | 82 bool UpdateScreen::HasInstance(UpdateScreen* inst) { |
| 82 InstanceSet& instance_set = GetInstanceSet(); | 83 InstanceSet& instance_set = GetInstanceSet(); |
| 83 InstanceSet::iterator found = instance_set.find(inst); | 84 InstanceSet::iterator found = instance_set.find(inst); |
| 84 return (found != instance_set.end()); | 85 return (found != instance_set.end()); |
| 85 } | 86 } |
| 86 | 87 |
| 88 // static |
| 89 UpdateScreen* UpdateScreen::Get(ScreenManager* manager) { |
| 90 return static_cast<UpdateScreen*>( |
| 91 manager->GetScreen(WizardController::kUpdateScreenName)); |
| 92 } |
| 93 |
| 87 UpdateScreen::UpdateScreen( | 94 UpdateScreen::UpdateScreen( |
| 88 ScreenObserver* screen_observer, | 95 ScreenObserver* screen_observer, |
| 89 UpdateScreenActor* actor) | 96 UpdateScreenActor* actor) |
| 90 : WizardScreen(screen_observer), | 97 : WizardScreen(screen_observer), |
| 91 state_(STATE_IDLE), | 98 state_(STATE_IDLE), |
| 92 reboot_check_delay_(0), | 99 reboot_check_delay_(0), |
| 93 is_checking_for_update_(true), | 100 is_checking_for_update_(true), |
| 94 is_downloading_update_(false), | 101 is_downloading_update_(false), |
| 95 is_ignore_update_deadlines_(false), | 102 is_ignore_update_deadlines_(false), |
| 96 is_shown_(false), | 103 is_shown_(false), |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, | 520 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, |
| 514 std::string()); | 521 std::string()); |
| 515 break; | 522 break; |
| 516 default: | 523 default: |
| 517 NOTREACHED(); | 524 NOTREACHED(); |
| 518 break; | 525 break; |
| 519 } | 526 } |
| 520 } | 527 } |
| 521 | 528 |
| 522 } // namespace chromeos | 529 } // namespace chromeos |
| OLD | NEW |