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

Unified Diff: update_attempter.cc

Issue 3022008: For actions, switch bool success into an exit code. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: switch to all positive error codes. Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « update_attempter.h ('k') | utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.cc
diff --git a/update_attempter.cc b/update_attempter.cc
index 7e536b48699c767ad3784bece92672a31e58cf7a..b5d9644970e94abc67efd75a35cca9247f839654 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -198,11 +198,11 @@ void UpdateAttempter::CheckForUpdate() {
// Delegate methods:
void UpdateAttempter::ProcessingDone(const ActionProcessor* processor,
- bool success) {
+ ActionExitCode code) {
CHECK(response_handler_action_);
LOG(INFO) << "Processing Done.";
actions_.clear();
- if (success) {
+ if (code == kActionCodeSuccess) {
SetStatusAndNotify(UPDATE_STATUS_UPDATED_NEED_REBOOT);
utils::WriteFile(kUpdateCompletedMarker, "", 0);
} else {
@@ -221,13 +221,13 @@ void UpdateAttempter::ProcessingStopped(const ActionProcessor* processor) {
// or otherwise.
void UpdateAttempter::ActionCompleted(ActionProcessor* processor,
AbstractAction* action,
- bool success) {
+ ActionExitCode code) {
// Reset download progress regardless of whether or not the download action
// succeeded.
const string type = action->Type();
if (type == DownloadAction::StaticType())
download_progress_ = 0.0;
- if (!success)
+ if (code != kActionCodeSuccess)
return;
// Find out which action completed.
if (type == OmahaResponseHandlerAction::StaticType()) {
« no previous file with comments | « update_attempter.h ('k') | utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698