shill: Refactor SIM lock status properties into the GSM delegate.

BUG=chromium-os:18735
TEST=unit tests (old and new)

Change-Id: I829eb6cee67cb1ab418cf16a32c2195e3446a22b
Reviewed-on: https://gerrit.chromium.org/gerrit/11765
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.h b/cellular.h
index 090c589..978904c 100644
--- a/cellular.h
+++ b/cellular.h
@@ -89,17 +89,6 @@
     DISALLOW_COPY_AND_ASSIGN(Operator);
   };
 
-  struct SimLockStatus {
-   public:
-    SimLockStatus() : retries_left(0) {}
-    SimLockStatus(const std::string &in_lock_type, uint32 in_retries_left)
-        : lock_type(in_lock_type),
-          retries_left(in_retries_left) {}
-
-    std::string lock_type;
-    uint32 retries_left;
-  };
-
   static const char kConnectPropertyPhoneNumber[];
 
   // |owner| is the ModemManager DBus service owner (e.g., ":1.17"). |path| is
@@ -134,9 +123,6 @@
   void set_modem_state(ModemState state) { modem_state_ = state; }
   ModemState modem_state() const { return modem_state_; }
 
-  const SimLockStatus &sim_lock_status() const { return sim_lock_status_; }
-  void set_sim_lock_status(const SimLockStatus &s) { sim_lock_status_ = s; }
-
   mobile_provider_db *provider_db() const { return provider_db_; }
 
   const std::string &dbus_owner() const { return dbus_owner_; }
@@ -190,13 +176,13 @@
   friend class CellularTest;
   friend class CellularCapabilityCDMATest;
   friend class CellularCapabilityGSMTest;
+  friend class ModemTest;
   FRIEND_TEST(CellularTest, CreateService);
   FRIEND_TEST(CellularTest, Connect);
   FRIEND_TEST(CellularTest, GetModemInfo);
   FRIEND_TEST(CellularTest, GetModemStatus);
   FRIEND_TEST(CellularTest, GetTypeString);
-  FRIEND_TEST(CellularTest, InitProxiesCDMA);
-  FRIEND_TEST(CellularTest, InitProxiesGSM);
+  FRIEND_TEST(CellularTest, InitProxies);
   FRIEND_TEST(CellularTest, StartConnected);
   FRIEND_TEST(CellularTest, StartCDMARegister);
   FRIEND_TEST(CellularTest, StartGSMRegister);
@@ -210,13 +196,6 @@
   // to the network-connected state and bring the network interface up.
   void EstablishLink();
 
-  StrIntPair SimLockStatusToProperty(Error *error);
-
-  void HelpRegisterDerivedStrIntPair(
-      const std::string &name,
-      StrIntPair(Cellular::*get)(Error *),
-      void(Cellular::*set)(const StrIntPair&, Error *));
-
   void InitCapability();
   void InitProxies();
 
@@ -270,7 +249,6 @@
   std::string manufacturer_;
   std::string firmware_revision_;
   std::string hardware_revision_;
-  SimLockStatus sim_lock_status_;
   Operator home_provider_;
 
   DISALLOW_COPY_AND_ASSIGN(Cellular);