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

Side by Side Diff: update_attempter.h

Issue 3167039: AU: Simplify the automatic update check code a little. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Rename to avoid confusion. Created 10 years, 3 months 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 | « main.cc ('k') | update_attempter.cc » ('j') | 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_ATTEMPTER_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
7 7
8 #include <time.h> 8 #include <time.h>
9 9
10 #include <tr1/memory> 10 #include <tr1/memory>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // This is the D-Bus service entry point for going through an 82 // This is the D-Bus service entry point for going through an
83 // update. If the current status is idle invokes Update. 83 // update. If the current status is idle invokes Update.
84 void CheckForUpdate(const std::string& app_version, 84 void CheckForUpdate(const std::string& app_version,
85 const std::string& omaha_url); 85 const std::string& omaha_url);
86 86
87 // Initiates a reboot if the current state is 87 // Initiates a reboot if the current state is
88 // UPDATED_NEED_REBOOT. Returns true on sucess, false otherwise. 88 // UPDATED_NEED_REBOOT. Returns true on sucess, false otherwise.
89 bool RebootIfNeeded(); 89 bool RebootIfNeeded();
90 90
91 // Kicks off the periodic update checks, if necessary.
92 void InitiatePeriodicUpdateChecks();
93
94 // Schedules the next periodic update check |seconds| from now. Note
95 // that the actual timeout will be fuzzed.
96 void SchedulePeriodicUpdateCheck(int seconds);
97
91 // DownloadActionDelegate methods 98 // DownloadActionDelegate methods
92 void SetDownloadStatus(bool active); 99 void SetDownloadStatus(bool active);
93 void BytesReceived(uint64_t bytes_received, uint64_t total); 100 void BytesReceived(uint64_t bytes_received, uint64_t total);
94 101
95 private: 102 private:
96 // Sets the status to the given status and notifies a status update 103 // Sets the status to the given status and notifies a status update
97 // over dbus. 104 // over dbus.
98 void SetStatusAndNotify(UpdateStatus status); 105 void SetStatusAndNotify(UpdateStatus status);
99 106
100 // Creates an error event object in |error_event_| to be included in 107 // Creates an error event object in |error_event_| to be included in
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 177
171 // Device paramaters common to all Omaha requests. 178 // Device paramaters common to all Omaha requests.
172 OmahaRequestDeviceParams omaha_request_params_; 179 OmahaRequestDeviceParams omaha_request_params_;
173 180
174 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); 181 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter);
175 }; 182 };
176 183
177 } // namespace chromeos_update_engine 184 } // namespace chromeos_update_engine
178 185
179 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ 186 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
OLDNEW
« no previous file with comments | « main.cc ('k') | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698