shill: move CellularTaskList from CellularCapability to CellularCapabilityClassic

Move CellularTaskList from CellularCapability to
CellularCapabilityClassic because it is not used by the base class nor
by CellularCapabilityUniversal.

BUG=none
TEST=run unit tests

Change-Id: I65064293eb86410d22e2aef7e3555a9a883e5109
Reviewed-on: https://gerrit.chromium.org/gerrit/21865
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
diff --git a/cellular_capability_classic.h b/cellular_capability_classic.h
index 664c9ba..3f41e25 100644
--- a/cellular_capability_classic.h
+++ b/cellular_capability_classic.h
@@ -88,6 +88,8 @@
       const std::vector<std::string> &invalidated_properties);
 
  protected:
+  typedef std::vector<base::Closure> CellularTaskList;
+
   virtual void GetRegistrationState() = 0;
 
   // The following five methods are only ever called as
@@ -107,6 +109,18 @@
 
   static void OnUnsupportedOperation(const char *operation, Error *error);
 
+  // Runs the next task in a list.
+  // Precondition: |tasks| is not empty.
+  void RunNextStep(CellularTaskList *tasks);
+  // StepCompletedCallback is called after a task completes.
+  // |callback| is the original callback that needs to be invoked when all of
+  // the tasks complete or if there is a failure.  |ignore_error| will be set
+  // to true if the next task should be run regardless of the result of the
+  // just-completed task.  |tasks| is the list of tasks remaining.  |error| is
+  // the result of the just-completed task.
+  void StepCompletedCallback(const ResultCallback &callback, bool ignore_error,
+                             CellularTaskList *tasks, const Error &error);
+
   // Properties
   bool scanning_supported_;
   std::string meid_;