OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_SCHEDULER_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_SCHEDULER_H__ |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_SCHEDULER_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_SCHEDULER_H__ |
7 | 7 |
8 #include <base/basictypes.h> | 8 #include <base/basictypes.h> |
9 #include <glib.h> | 9 #include <glib.h> |
10 #include <gtest/gtest_prod.h> // for FRIEND_TEST | 10 #include <gtest/gtest_prod.h> // for FRIEND_TEST |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckDisabledTest); | 69 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckDisabledTest); |
70 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckEnabledTest); | 70 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckEnabledTest); |
71 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckNegativeIntervalTest); | 71 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleCheckNegativeIntervalTest); |
72 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleNextCheckDisabledTest); | 72 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleNextCheckDisabledTest); |
73 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleNextCheckEnabledTest); | 73 FRIEND_TEST(UpdateCheckSchedulerTest, ScheduleNextCheckEnabledTest); |
74 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusIdleDisabledTest); | 74 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusIdleDisabledTest); |
75 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusIdleEnabledTest); | 75 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusIdleEnabledTest); |
76 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusNonIdleTest); | 76 FRIEND_TEST(UpdateCheckSchedulerTest, SetUpdateStatusNonIdleTest); |
77 FRIEND_TEST(UpdateCheckSchedulerTest, StaticCheckOOBECompleteTest); | 77 FRIEND_TEST(UpdateCheckSchedulerTest, StaticCheckOOBECompleteTest); |
78 FRIEND_TEST(UpdateCheckSchedulerTest, StaticCheckOOBENotCompleteTest); | 78 FRIEND_TEST(UpdateCheckSchedulerTest, StaticCheckOOBENotCompleteTest); |
| 79 FRIEND_TEST(UpdateAttempterTest, PingOmahaTest); |
79 | 80 |
80 // Wraps GLib's g_timeout_add_seconds so that it can be mocked in tests. | 81 // Wraps GLib's g_timeout_add_seconds so that it can be mocked in tests. |
81 virtual guint GTimeoutAddSeconds(guint interval, GSourceFunc function); | 82 virtual guint GTimeoutAddSeconds(guint interval, GSourceFunc function); |
82 | 83 |
83 // Wrappers for utils functions so that they can be mocked in tests. | 84 // Wrappers for utils functions so that they can be mocked in tests. |
84 virtual bool IsBootDeviceRemovable(); | 85 virtual bool IsBootDeviceRemovable(); |
85 virtual bool IsOOBEComplete(); | 86 virtual bool IsOOBEComplete(); |
86 virtual bool IsOfficialBuild(); | 87 virtual bool IsOfficialBuild(); |
87 | 88 |
88 // Returns true if an update check can be scheduled. An update check should | 89 // Returns true if an update check can be scheduled. An update check should |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 // Server dictated poll interval in seconds, if positive. | 122 // Server dictated poll interval in seconds, if positive. |
122 int poll_interval_; | 123 int poll_interval_; |
123 | 124 |
124 DISALLOW_COPY_AND_ASSIGN(UpdateCheckScheduler); | 125 DISALLOW_COPY_AND_ASSIGN(UpdateCheckScheduler); |
125 }; | 126 }; |
126 | 127 |
127 } // namespace chromeos_update_engine | 128 } // namespace chromeos_update_engine |
128 | 129 |
129 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CHECK_SCHEDULER_H__ | 130 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CHECK_SCHEDULER_H__ |
OLD | NEW |