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

Side by Side Diff: update_attempter.cc

Issue 3521016: AU: Start checkpointing update progress. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: address review comments Created 10 years, 2 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 | « prefs_interface.h ('k') | update_attempter_unittest.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 #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
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
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
OLDNEW
« no previous file with comments | « prefs_interface.h ('k') | update_attempter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698