| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 CHECK(!processor_->IsRunning()); | 134 CHECK(!processor_->IsRunning()); |
| 135 processor_->set_delegate(this); | 135 processor_->set_delegate(this); |
| 136 | 136 |
| 137 // Actions: | 137 // Actions: |
| 138 shared_ptr<OmahaRequestAction> update_check_action( | 138 shared_ptr<OmahaRequestAction> update_check_action( |
| 139 new OmahaRequestAction(prefs_, | 139 new OmahaRequestAction(prefs_, |
| 140 omaha_request_params_, | 140 omaha_request_params_, |
| 141 NULL, | 141 NULL, |
| 142 new LibcurlHttpFetcher)); | 142 new LibcurlHttpFetcher)); |
| 143 shared_ptr<OmahaResponseHandlerAction> response_handler_action( | 143 shared_ptr<OmahaResponseHandlerAction> response_handler_action( |
| 144 new OmahaResponseHandlerAction); | 144 new OmahaResponseHandlerAction(prefs_)); |
| 145 shared_ptr<FilesystemCopierAction> filesystem_copier_action( | 145 shared_ptr<FilesystemCopierAction> filesystem_copier_action( |
| 146 new FilesystemCopierAction(false)); | 146 new FilesystemCopierAction(false)); |
| 147 shared_ptr<FilesystemCopierAction> kernel_filesystem_copier_action( | 147 shared_ptr<FilesystemCopierAction> kernel_filesystem_copier_action( |
| 148 new FilesystemCopierAction(true)); | 148 new FilesystemCopierAction(true)); |
| 149 shared_ptr<OmahaRequestAction> download_started_action( | 149 shared_ptr<OmahaRequestAction> download_started_action( |
| 150 new OmahaRequestAction(prefs_, | 150 new OmahaRequestAction(prefs_, |
| 151 omaha_request_params_, | 151 omaha_request_params_, |
| 152 new OmahaEvent( | 152 new OmahaEvent( |
| 153 OmahaEvent::kTypeUpdateDownloadStarted), | 153 OmahaEvent::kTypeUpdateDownloadStarted), |
| 154 new LibcurlHttpFetcher)); | 154 new LibcurlHttpFetcher)); |
| 155 shared_ptr<DownloadAction> download_action( | 155 shared_ptr<DownloadAction> download_action( |
| 156 new DownloadAction(new LibcurlHttpFetcher)); | 156 new DownloadAction(prefs_, new LibcurlHttpFetcher)); |
| 157 shared_ptr<OmahaRequestAction> download_finished_action( | 157 shared_ptr<OmahaRequestAction> download_finished_action( |
| 158 new OmahaRequestAction(prefs_, | 158 new OmahaRequestAction(prefs_, |
| 159 omaha_request_params_, | 159 omaha_request_params_, |
| 160 new OmahaEvent( | 160 new OmahaEvent( |
| 161 OmahaEvent::kTypeUpdateDownloadFinished), | 161 OmahaEvent::kTypeUpdateDownloadFinished), |
| 162 new LibcurlHttpFetcher)); | 162 new LibcurlHttpFetcher)); |
| 163 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_precommit( | 163 shared_ptr<PostinstallRunnerAction> postinstall_runner_action_precommit( |
| 164 new PostinstallRunnerAction(true)); | 164 new PostinstallRunnerAction(true)); |
| 165 shared_ptr<SetBootableFlagAction> set_bootable_flag_action( | 165 shared_ptr<SetBootableFlagAction> set_bootable_flag_action( |
| 166 new SetBootableFlagAction); | 166 new SetBootableFlagAction); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 CHECK(!is_full_update_); | 519 CHECK(!is_full_update_); |
| 520 int64_t delta_failures; | 520 int64_t delta_failures; |
| 521 if (!prefs_->GetInt64(kPrefsDeltaUpdateFailures, &delta_failures) || | 521 if (!prefs_->GetInt64(kPrefsDeltaUpdateFailures, &delta_failures) || |
| 522 delta_failures < 0) { | 522 delta_failures < 0) { |
| 523 delta_failures = 0; | 523 delta_failures = 0; |
| 524 } | 524 } |
| 525 prefs_->SetInt64(kPrefsDeltaUpdateFailures, ++delta_failures); | 525 prefs_->SetInt64(kPrefsDeltaUpdateFailures, ++delta_failures); |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace chromeos_update_engine | 528 } // namespace chromeos_update_engine |
| OLD | NEW |