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

Unified Diff: omaha_request_action.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 | « integration_unittest.cc ('k') | omaha_request_action_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_action.cc
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index 6f9a7900f4696a462948f564ac3d1bd4c48bc866..e801f408e9d2647f04d26e0c505837723f24c318 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -215,7 +215,7 @@ void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher,
// Events are best effort transactions -- assume they always succeed.
if (IsEvent()) {
CHECK(!HasOutputPipe()) << "No output pipe allowed for event requests.";
- completer.set_success(true);
+ completer.set_code(kActionCodeSuccess);
return;
}
@@ -226,7 +226,7 @@ void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher,
if (!HasOutputPipe()) {
// Just set success to whether or not the http transfer succeeded,
// which must be true at this point in the code.
- completer.set_success(true);
+ completer.set_code(kActionCodeSuccess);
return;
}
@@ -267,7 +267,7 @@ void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher,
LOG(INFO) << "No update.";
output_object.update_exists = false;
SetOutputObject(output_object);
- completer.set_success(true);
+ completer.set_code(kActionCodeSuccess);
return;
}
@@ -279,7 +279,7 @@ void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher,
// In best-effort fashion, fetch the rest of the expected attributes
// from the updatecheck node, then return the object
output_object.update_exists = true;
- completer.set_success(true);
+ completer.set_code(kActionCodeSuccess);
output_object.display_version =
XmlGetProperty(updatecheck_node, "DisplayVersion");
« no previous file with comments | « integration_unittest.cc ('k') | omaha_request_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698