| 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 #include "update_engine/update_attempter.h" | 5 #include "update_engine/update_attempter.h" |
| 6 | 6 |
| 7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L | 7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L |
| 8 #ifndef _POSIX_C_SOURCE | 8 #ifndef _POSIX_C_SOURCE |
| 9 #define _POSIX_C_SOURCE 199309L | 9 #define _POSIX_C_SOURCE 199309L |
| 10 #endif // _POSIX_C_SOURCE | 10 #endif // _POSIX_C_SOURCE |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 new LibcurlHttpFetcher)); | 109 new LibcurlHttpFetcher)); |
| 110 shared_ptr<OmahaResponseHandlerAction> response_handler_action( | 110 shared_ptr<OmahaResponseHandlerAction> response_handler_action( |
| 111 new OmahaResponseHandlerAction); | 111 new OmahaResponseHandlerAction); |
| 112 shared_ptr<FilesystemCopierAction> filesystem_copier_action( | 112 shared_ptr<FilesystemCopierAction> filesystem_copier_action( |
| 113 new FilesystemCopierAction(false)); | 113 new FilesystemCopierAction(false)); |
| 114 shared_ptr<FilesystemCopierAction> kernel_filesystem_copier_action( | 114 shared_ptr<FilesystemCopierAction> kernel_filesystem_copier_action( |
| 115 new FilesystemCopierAction(true)); | 115 new FilesystemCopierAction(true)); |
| 116 shared_ptr<OmahaRequestAction> download_started_action( | 116 shared_ptr<OmahaRequestAction> download_started_action( |
| 117 new OmahaRequestAction(omaha_request_params_, | 117 new OmahaRequestAction(omaha_request_params_, |
| 118 new OmahaEvent( | 118 new OmahaEvent( |
| 119 OmahaEvent::kTypeUpdateDownloadStarted, | 119 OmahaEvent::kTypeUpdateDownloadStarted), |
| 120 OmahaEvent::kResultSuccess, | |
| 121 0), | |
| 122 new LibcurlHttpFetcher)); | 120 new LibcurlHttpFetcher)); |
| 123 shared_ptr<DownloadAction> download_action( | 121 shared_ptr<DownloadAction> download_action( |
| 124 new DownloadAction(new LibcurlHttpFetcher)); | 122 new DownloadAction(new LibcurlHttpFetcher)); |
| 125 shared_ptr<OmahaRequestAction> download_finished_action( | 123 shared_ptr<OmahaRequestAction> download_finished_action( |
| 126 new OmahaRequestAction(omaha_request_params_, | 124 new OmahaRequestAction(omaha_request_params_, |
| 127 new OmahaEvent( | 125 new OmahaEvent( |
| 128 OmahaEvent::kTypeUpdateDownloadFinished, | 126 OmahaEvent::kTypeUpdateDownloadFinished), |
| 129 OmahaEvent::kResultSuccess, | |
| 130 0), | |
| 131 new LibcurlHttpFetcher)); | 127 new LibcurlHttpFetcher)); |
| 132 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_precommit( | 128 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_precommit( |
| 133 new PostinstallRunnerAction(true)); | 129 new PostinstallRunnerAction(true)); |
| 134 shared_ptr<SetBootableFlagAction> set_bootable_flag_action( | 130 shared_ptr<SetBootableFlagAction> set_bootable_flag_action( |
| 135 new SetBootableFlagAction); | 131 new SetBootableFlagAction); |
| 136 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_postcommit( | 132 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_postcommit( |
| 137 new PostinstallRunnerAction(false)); | 133 new PostinstallRunnerAction(false)); |
| 138 shared_ptr<OmahaRequestAction> update_complete_action( | 134 shared_ptr<OmahaRequestAction> update_complete_action( |
| 139 new OmahaRequestAction(omaha_request_params_, | 135 new OmahaRequestAction(omaha_request_params_, |
| 140 new OmahaEvent(OmahaEvent::kTypeUpdateComplete, | 136 new OmahaEvent(OmahaEvent::kTypeUpdateComplete), |
| 141 OmahaEvent::kResultSuccess, | |
| 142 0), | |
| 143 new LibcurlHttpFetcher)); | 137 new LibcurlHttpFetcher)); |
| 144 | 138 |
| 145 download_action->set_delegate(this); | 139 download_action->set_delegate(this); |
| 146 response_handler_action_ = response_handler_action; | 140 response_handler_action_ = response_handler_action; |
| 147 | 141 |
| 148 actions_.push_back(shared_ptr<AbstractAction>(update_check_action)); | 142 actions_.push_back(shared_ptr<AbstractAction>(update_check_action)); |
| 149 actions_.push_back(shared_ptr<AbstractAction>(response_handler_action)); | 143 actions_.push_back(shared_ptr<AbstractAction>(response_handler_action)); |
| 150 actions_.push_back(shared_ptr<AbstractAction>(filesystem_copier_action)); | 144 actions_.push_back(shared_ptr<AbstractAction>(filesystem_copier_action)); |
| 151 actions_.push_back(shared_ptr<AbstractAction>( | 145 actions_.push_back(shared_ptr<AbstractAction>( |
| 152 kernel_filesystem_copier_action)); | 146 kernel_filesystem_copier_action)); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 update_engine_service_emit_status_update( | 291 update_engine_service_emit_status_update( |
| 298 dbus_service_, | 292 dbus_service_, |
| 299 last_checked_time_, | 293 last_checked_time_, |
| 300 download_progress_, | 294 download_progress_, |
| 301 UpdateStatusToString(status_), | 295 UpdateStatusToString(status_), |
| 302 new_version_.c_str(), | 296 new_version_.c_str(), |
| 303 new_size_); | 297 new_size_); |
| 304 } | 298 } |
| 305 | 299 |
| 306 } // namespace chromeos_update_engine | 300 } // namespace chromeos_update_engine |
| OLD | NEW |