shill: cellular: Properly translate errors from ModemManager.

The existing code that handled mapping some ModemManager errors to shill
API errors did not conform to the ModemManager1 API. This CL adds a new
static method to CellularError to handle ModemManager1 errors
separately.

BUG=chromium:248835
TEST=1. Build and run unit tests.
     2. Start the pseudomodem in locked mode (after stopping
        ModemManager and cromo).
     3. Use dbus-send or python to interact with the shill Device API
        directly. Use methods such as EnterPin with incorrect values and
        verify that the D-Bus error returned by shill are meaningful
        (e.g. entering an incorrect pin should return an error with the
        name 'org.chromium.flimflam.Error.IncorrectPin').

Change-Id: I0672595cf1db39491e7c946a3527ced80cff8ceb
Reviewed-on: https://gerrit.chromium.org/gerrit/60796
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
diff --git a/mm1_modem_location_proxy.cc b/mm1_modem_location_proxy.cc
index dd4cc29..0f37bef 100644
--- a/mm1_modem_location_proxy.cc
+++ b/mm1_modem_location_proxy.cc
@@ -32,7 +32,7 @@
     cb.release();
   } catch (const DBus::Error &e) {
     if (error)
-      CellularError::FromDBusError(e, error);
+      CellularError::FromMM1DBusError(e, error);
   }
 }
 
@@ -48,7 +48,7 @@
     cb.release();
   } catch (const DBus::Error &e) {
     if (error)
-      CellularError::FromDBusError(e, error);
+      CellularError::FromMM1DBusError(e, error);
   }
 }
 
@@ -106,7 +106,7 @@
   SLOG(DBus, 2) << __func__;
   scoped_ptr<ResultCallback> callback(reinterpret_cast<ResultCallback *>(data));
   Error error;
-  CellularError::FromDBusError(dberror, &error);
+  CellularError::FromMM1DBusError(dberror, &error);
   callback->Run(error);
 }
 
@@ -118,7 +118,7 @@
   scoped_ptr<DBusEnumValueMapCallback> callback(
       reinterpret_cast<DBusEnumValueMapCallback *>(data));
   Error error;
-  CellularError::FromDBusError(dberror, &error);
+  CellularError::FromMM1DBusError(dberror, &error);
   callback->Run(location, error);
 }