shill: cellular: Keep track of activation per ICCID after online payment.

CellularCapabilityUniversal now internally keeps a state machine that
keeps track of the activation status of the cellular service associated
with the current SIM, once an online payment has successfully completed.

BUG=chromium-os:38851
TEST=1. Build and run unit tests.
     2. - Insert an unactivated LTE SIM.
        - ff_debug cellular; ff_debug --level -4.
        - Go on and activate the service through the OLP portal.
        - Watch /var/log/net.log. Look for a call to
          CellularCapabilityUniversal::CompleteActivation.
        - Check that /var/cache/shill/activating_iccid_store.profile
          contains the current ICCID with an assigned value of 1.
        - Wait for modem to reset. After the reset ends, the above file
          should contain a value of 2 assigned to the current ICCID.
        - Make sure that we eventually get cellular connectivity.
        - If the MDN updates (possibly after a manual reset), make sure
          that the ICCID entry has been removed from the file.

Change-Id: If4265b2c0ef1154fe4c8d164249226a31657f707
Reviewed-on: https://gerrit.chromium.org/gerrit/43589
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/cellular_service.h b/cellular_service.h
index 4c1a8c1..0d7d2ec 100644
--- a/cellular_service.h
+++ b/cellular_service.h
@@ -67,6 +67,7 @@
   virtual void ActivateCellularModem(const std::string &carrier,
                                      Error *error,
                                      const ResultCallback &callback);
+  virtual void CompleteCellularActivation(Error *error);
 
   virtual std::string GetStorageIdentifier() const;
   void SetStorageIdentifier(const std::string &identifier);
@@ -76,7 +77,7 @@
     return activate_over_non_cellular_network_;
   }
 
-  void SetActivationState(const std::string &state);
+  virtual void SetActivationState(const std::string &state);
   const std::string &activation_state() const { return activation_state_; }
 
   void SetOLP(const OLP &olp);
@@ -119,6 +120,7 @@
   friend class CellularServiceTest;
   FRIEND_TEST(CellularCapabilityGSMTest, SetupApnTryList);
   FRIEND_TEST(CellularCapabilityTest, TryApns);
+  FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateIccidActivationState);
   FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateServiceName);
   FRIEND_TEST(CellularCapabilityUniversalMainTest, UpdateStorageIdentifier);
   FRIEND_TEST(CellularTest, Connect);