Rename ActionExitCode to ErrorCode

Nowadays ActionExitCode is used throughout the codebase so use a more
generic name to reflect this.

BUG=chromium:216507
TEST=unit tests pass

Change-Id: I23d1d7e2676443251dbc42ed137fd018aadfa8a3
Reviewed-on: https://gerrit.chromium.org/gerrit/49512
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
diff --git a/filesystem_copier_action_unittest.cc b/filesystem_copier_action_unittest.cc
index bf44c4f..3ffed88 100644
--- a/filesystem_copier_action_unittest.cc
+++ b/filesystem_copier_action_unittest.cc
@@ -45,7 +45,7 @@
  public:
   FilesystemCopierActionTestDelegate(GMainLoop* loop,
                                      FilesystemCopierAction* action)
-      : loop_(loop), action_(action), ran_(false), code_(kActionCodeError) {}
+      : loop_(loop), action_(action), ran_(false), code_(kErrorCodeError) {}
   void ExitMainLoop() {
     GMainContext* context = g_main_loop_get_context(loop_);
     // We cannot use g_main_context_pending() alone to determine if it is safe
@@ -58,7 +58,7 @@
     }
     g_main_loop_quit(loop_);
   }
-  void ProcessingDone(const ActionProcessor* processor, ActionExitCode code) {
+  void ProcessingDone(const ActionProcessor* processor, ErrorCode code) {
     ExitMainLoop();
   }
   void ProcessingStopped(const ActionProcessor* processor) {
@@ -66,19 +66,19 @@
   }
   void ActionCompleted(ActionProcessor* processor,
                        AbstractAction* action,
-                       ActionExitCode code) {
+                       ErrorCode code) {
     if (action->Type() == FilesystemCopierAction::StaticType()) {
       ran_ = true;
       code_ = code;
     }
   }
   bool ran() const { return ran_; }
-  ActionExitCode code() const { return code_; }
+  ErrorCode code() const { return code_; }
  private:
   GMainLoop* loop_;
   FilesystemCopierAction* action_;
   bool ran_;
-  ActionExitCode code_;
+  ErrorCode code_;
 };
 
 struct StartProcessorCallbackArgs {
@@ -229,18 +229,18 @@
     success = success && is_delegate_ran;
   }
   if (run_out_of_space || terminate_early) {
-    EXPECT_EQ(kActionCodeError, delegate.code());
-    return (kActionCodeError == delegate.code());
+    EXPECT_EQ(kErrorCodeError, delegate.code());
+    return (kErrorCodeError == delegate.code());
   }
   if (verify_hash == 2) {
-    ActionExitCode expected_exit_code =
+    ErrorCode expected_exit_code =
         (use_kernel_partition ?
-         kActionCodeNewKernelVerificationError :
-         kActionCodeNewRootfsVerificationError);
+         kErrorCodeNewKernelVerificationError :
+         kErrorCodeNewRootfsVerificationError);
     EXPECT_EQ(expected_exit_code, delegate.code());
     return (expected_exit_code == delegate.code());
   }
-  EXPECT_EQ(kActionCodeSuccess, delegate.code());
+  EXPECT_EQ(kErrorCodeSuccess, delegate.code());
 
   // Make sure everything in the out_image is there
   vector<char> a_out;
@@ -273,7 +273,7 @@
  public:
   void ActionCompleted(ActionProcessor* processor,
                        AbstractAction* action,
-                       ActionExitCode code) {
+                       ErrorCode code) {
     if (action->Type() == FilesystemCopierAction::StaticType()) {
       ran_ = true;
       code_ = code;
@@ -281,7 +281,7 @@
   }
   GMainLoop *loop_;
   bool ran_;
-  ActionExitCode code_;
+  ErrorCode code_;
 };
 
 TEST_F(FilesystemCopierActionTest, MissingInputObjectTest) {
@@ -300,7 +300,7 @@
   processor.StartProcessing();
   EXPECT_FALSE(processor.IsRunning());
   EXPECT_TRUE(delegate.ran_);
-  EXPECT_EQ(kActionCodeError, delegate.code_);
+  EXPECT_EQ(kErrorCodeError, delegate.code_);
 }
 
 TEST_F(FilesystemCopierActionTest, ResumeTest) {
@@ -325,7 +325,7 @@
   processor.StartProcessing();
   EXPECT_FALSE(processor.IsRunning());
   EXPECT_TRUE(delegate.ran_);
-  EXPECT_EQ(kActionCodeSuccess, delegate.code_);
+  EXPECT_EQ(kErrorCodeSuccess, delegate.code_);
   EXPECT_EQ(kUrl, collector_action.object().download_url);
 }
 
@@ -356,7 +356,7 @@
   processor.StartProcessing();
   EXPECT_FALSE(processor.IsRunning());
   EXPECT_TRUE(delegate.ran_);
-  EXPECT_EQ(kActionCodeError, delegate.code_);
+  EXPECT_EQ(kErrorCodeError, delegate.code_);
 }
 
 TEST_F(FilesystemCopierActionTest, RunAsRootVerifyHashTest) {