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

Unified Diff: action_processor_unittest.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 | « action_processor.cc ('k') | action_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: action_processor_unittest.cc
diff --git a/action_processor_unittest.cc b/action_processor_unittest.cc
index 40275a03390f268224ff777be42d32dfd3fd7774..7f3914977beb7761b460df541c1623bc76a2bdc9 100644
--- a/action_processor_unittest.cc
+++ b/action_processor_unittest.cc
@@ -32,7 +32,7 @@ struct ActionProcessorTestAction : public Action<ActionProcessorTestAction> {
void PerformAction() {}
void CompleteAction() {
ASSERT_TRUE(processor());
- processor()->ActionComplete(this, true);
+ processor()->ActionComplete(this, kActionCodeSuccess);
}
string Type() const { return "ActionProcessorTestAction"; }
};
@@ -65,9 +65,10 @@ class MyActionProcessorDelegate : public ActionProcessorDelegate {
processing_done_called_(false),
processing_stopped_called_(false),
action_completed_called_(false),
- action_completed_success_(false) {}
+ action_exit_code_(kActionCodeError) {}
- virtual void ProcessingDone(const ActionProcessor* processor, bool success) {
+ virtual void ProcessingDone(const ActionProcessor* processor,
+ ActionExitCode code) {
EXPECT_EQ(processor_, processor);
EXPECT_FALSE(processing_done_called_);
processing_done_called_ = true;
@@ -79,18 +80,18 @@ class MyActionProcessorDelegate : public ActionProcessorDelegate {
}
virtual void ActionCompleted(ActionProcessor* processor,
AbstractAction* action,
- bool success) {
+ ActionExitCode code) {
EXPECT_EQ(processor_, processor);
EXPECT_FALSE(action_completed_called_);
action_completed_called_ = true;
- action_completed_success_ = success;
+ action_exit_code_ = code;
}
const ActionProcessor* processor_;
bool processing_done_called_;
bool processing_stopped_called_;
bool action_completed_called_;
- bool action_completed_success_;
+ ActionExitCode action_exit_code_;
};
} // namespace {}
« no previous file with comments | « action_processor.cc ('k') | action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698