| 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_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 #include <tr1/memory> | 9 #include <tr1/memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 new_version_("0.0.0.0"), | 43 new_version_("0.0.0.0"), |
| 44 new_size_(0) { | 44 new_size_(0) { |
| 45 last_notify_time_.tv_sec = 0; | 45 last_notify_time_.tv_sec = 0; |
| 46 last_notify_time_.tv_nsec = 0; | 46 last_notify_time_.tv_nsec = 0; |
| 47 if (utils::FileExists(kUpdateCompletedMarker)) | 47 if (utils::FileExists(kUpdateCompletedMarker)) |
| 48 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT; | 48 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT; |
| 49 } | 49 } |
| 50 void Update(); | 50 void Update(); |
| 51 | 51 |
| 52 // ActionProcessorDelegate methods: | 52 // ActionProcessorDelegate methods: |
| 53 void ProcessingDone(const ActionProcessor* processor, bool success); | 53 void ProcessingDone(const ActionProcessor* processor, ActionExitCode code); |
| 54 void ProcessingStopped(const ActionProcessor* processor); | 54 void ProcessingStopped(const ActionProcessor* processor); |
| 55 void ActionCompleted(ActionProcessor* processor, | 55 void ActionCompleted(ActionProcessor* processor, |
| 56 AbstractAction* action, | 56 AbstractAction* action, |
| 57 bool success); | 57 ActionExitCode code); |
| 58 | 58 |
| 59 // Stop updating. An attempt will be made to record status to the disk | 59 // Stop updating. An attempt will be made to record status to the disk |
| 60 // so that updates can be resumed later. | 60 // so that updates can be resumed later. |
| 61 void Terminate(); | 61 void Terminate(); |
| 62 | 62 |
| 63 // Try to resume from a previously Terminate()d update. | 63 // Try to resume from a previously Terminate()d update. |
| 64 void ResumeUpdating(); | 64 void ResumeUpdating(); |
| 65 | 65 |
| 66 // Returns the current status in the out params. Returns true on success. | 66 // Returns the current status in the out params. Returns true on success. |
| 67 bool GetStatus(int64_t* last_checked_time, | 67 bool GetStatus(int64_t* last_checked_time, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 // Device paramaters common to all Omaha requests. | 106 // Device paramaters common to all Omaha requests. |
| 107 OmahaRequestDeviceParams omaha_request_params_; | 107 OmahaRequestDeviceParams omaha_request_params_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); | 109 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace chromeos_update_engine | 112 } // namespace chromeos_update_engine |
| 113 | 113 |
| 114 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ | 114 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ |
| OLD | NEW |