OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "chrome/browser/chromeos/cros/update_library.h" | 10 #include "chrome/browser/chromeos/cros/update_library.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // Overridden from UpdateController: | 34 // Overridden from UpdateController: |
35 virtual void StartUpdate(); | 35 virtual void StartUpdate(); |
36 virtual void CancelUpdate(); | 36 virtual void CancelUpdate(); |
37 | 37 |
38 // Reports update results to the ScreenObserver. | 38 // Reports update results to the ScreenObserver. |
39 virtual void ExitUpdate(); | 39 virtual void ExitUpdate(); |
40 | 40 |
41 // Returns true if minimal update time has elapsed. | 41 // Returns true if minimal update time has elapsed. |
42 virtual bool MinimalUpdateTimeElapsed(); | 42 virtual bool MinimalUpdateTimeElapsed(); |
43 | 43 |
| 44 // Minimal update time get/set, in seconds. |
| 45 int minimal_update_time() const { return minimal_update_time_; } |
| 46 void SetMinimalUpdateTime(int seconds); |
| 47 |
| 48 // Reboot check delay get/set, in seconds. |
| 49 int reboot_check_delay() const { return reboot_check_delay_; } |
| 50 void SetRebootCheckDelay(int seconds); |
| 51 |
44 private: | 52 private: |
45 // Timer notification handlers. | 53 // Timer notification handlers. |
46 void OnMinimalUpdateTimeElapsed(); | 54 void OnMinimalUpdateTimeElapsed(); |
47 void OnWaitForRebootTimeElapsed(); | 55 void OnWaitForRebootTimeElapsed(); |
48 | 56 |
49 // Timer for the minimal interval when update screen is shown. | 57 // Timer for the minimal interval when update screen is shown. |
50 base::OneShotTimer<UpdateScreen> minimal_update_time_timer_; | 58 base::OneShotTimer<UpdateScreen> minimal_update_time_timer_; |
51 | 59 |
52 // Timer for the interval to wait for the reboot. | 60 // Timer for the interval to wait for the reboot. |
53 // If reboot didn't happen - ask user to reboot manually. | 61 // If reboot didn't happen - ask user to reboot manually. |
54 base::OneShotTimer<UpdateScreen> reboot_timer_; | 62 base::OneShotTimer<UpdateScreen> reboot_timer_; |
55 | 63 |
56 // True if should proceed with OOBE once timer is elapsed. | 64 // True if should proceed with OOBE once timer is elapsed. |
57 bool proceed_with_oobe_; | 65 bool proceed_with_oobe_; |
58 | 66 |
59 // True if in the process of checking for update. | 67 // True if in the process of checking for update. |
60 bool checking_for_update_; | 68 bool checking_for_update_; |
61 | 69 |
| 70 // Minimal update delay in seconds, for a user to notice |
| 71 // check for update is taking place. |
| 72 int minimal_update_time_; |
| 73 |
| 74 // Time in seconds after which we decide that the device has not rebooted |
| 75 // automatically. If reboot didn't happen durin this interval, ask user to |
| 76 // reboot device manually. |
| 77 int reboot_check_delay_; |
| 78 |
62 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); | 79 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); |
63 }; | 80 }; |
64 | 81 |
65 } // namespace chromeos | 82 } // namespace chromeos |
66 | 83 |
67 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ |
OLD | NEW |