Move ParseConnection*() to connection_utils.

We don't need real_shill_provider if USE_DBUS is 0, but we still need
these functions, and they have a duplicate copy in connection_manager,
so put them in utils and deduplicate.

Also moved StringForConnectionType() to connection_utils.

Bug: 28800946
Test: mma

Change-Id: If535fdc52bc8fb267921bea02b31d8d6580d5d54
diff --git a/connection_manager_interface.h b/connection_manager_interface.h
index cb60a3c..d36ef76 100644
--- a/connection_manager_interface.h
+++ b/connection_manager_interface.h
@@ -19,24 +19,10 @@
 
 #include <base/macros.h>
 
+#include "update_engine/connection_utils.h"
+
 namespace chromeos_update_engine {
 
-enum class NetworkConnectionType {
-  kEthernet,
-  kWifi,
-  kWimax,
-  kBluetooth,
-  kCellular,
-  kUnknown
-};
-
-enum class NetworkTethering {
-  kNotDetected,
-  kSuspected,
-  kConfirmed,
-  kUnknown
-};
-
 // This class exposes a generic interface to the connection manager
 // (e.g FlimFlam, Shill, etc.) to consolidate all connection-related
 // logic in update_engine.
@@ -47,14 +33,14 @@
   // Populates |out_type| with the type of the network connection
   // that we are currently connected and |out_tethering| with the estimate of
   // whether that network is being tethered.
-  virtual bool GetConnectionProperties(NetworkConnectionType* out_type,
-                                       NetworkTethering* out_tethering) = 0;
+  virtual bool GetConnectionProperties(ConnectionType* out_type,
+                                       ConnectionTethering* out_tethering) = 0;
 
   // Returns true if we're allowed to update the system when we're
   // connected to the internet through the given network connection type and the
   // given tethering state.
-  virtual bool IsUpdateAllowedOver(NetworkConnectionType type,
-                                   NetworkTethering tethering) const = 0;
+  virtual bool IsUpdateAllowedOver(ConnectionType type,
+                                   ConnectionTethering tethering) const = 0;
 
  protected:
   ConnectionManagerInterface() = default;