Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: update_check_scheduler.h

Issue 5301002: AU: More UpdateAttempter unit tests. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « update_attempter_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 UpdateCheckScheduler(UpdateAttempter* update_attempter); 43 UpdateCheckScheduler(UpdateAttempter* update_attempter);
44 virtual ~UpdateCheckScheduler(); 44 virtual ~UpdateCheckScheduler();
45 45
46 // Initiates the periodic update checks, if necessary. 46 // Initiates the periodic update checks, if necessary.
47 void Run(); 47 void Run();
48 48
49 // Sets the new update status. This is invoked by UpdateAttempter. 49 // Sets the new update status. This is invoked by UpdateAttempter.
50 void SetUpdateStatus(UpdateStatus status); 50 void SetUpdateStatus(UpdateStatus status);
51 51
52 void set_poll_interval(int interval) { poll_interval_ = interval; } 52 void set_poll_interval(int interval) { poll_interval_ = interval; }
53 int poll_interval() const { return poll_interval_; }
53 54
54 private: 55 private:
55 friend class UpdateCheckSchedulerTest; 56 friend class UpdateCheckSchedulerTest;
56 FRIEND_TEST(UpdateCheckSchedulerTest, CanScheduleTest); 57 FRIEND_TEST(UpdateCheckSchedulerTest, CanScheduleTest);
57 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzBackoffTest); 58 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzBackoffTest);
58 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPollTest); 59 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPollTest);
59 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPriorityTest); 60 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzPriorityTest);
60 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzTest); 61 FRIEND_TEST(UpdateCheckSchedulerTest, ComputeNextIntervalAndFuzzTest);
61 FRIEND_TEST(UpdateCheckSchedulerTest, GTimeoutAddSecondsTest); 62 FRIEND_TEST(UpdateCheckSchedulerTest, GTimeoutAddSecondsTest);
62 FRIEND_TEST(UpdateCheckSchedulerTest, IsBootDeviceRemovableTest); 63 FRIEND_TEST(UpdateCheckSchedulerTest, IsBootDeviceRemovableTest);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 // Server dictated poll interval in seconds, if positive. 121 // Server dictated poll interval in seconds, if positive.
121 int poll_interval_; 122 int poll_interval_;
122 123
123 DISALLOW_COPY_AND_ASSIGN(UpdateCheckScheduler); 124 DISALLOW_COPY_AND_ASSIGN(UpdateCheckScheduler);
124 }; 125 };
125 126
126 } // namespace chromeos_update_engine 127 } // namespace chromeos_update_engine
127 128
128 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CHECK_SCHEDULER_H__ 129 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CHECK_SCHEDULER_H__
OLDNEW
« no previous file with comments | « update_attempter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698