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/update_manager/real_shill_provider.h b/update_manager/real_shill_provider.h
index dbd6fc5..815bbfc 100644
--- a/update_manager/real_shill_provider.h
+++ b/update_manager/real_shill_provider.h
@@ -49,11 +49,11 @@
     return &var_is_connected_;
   }
 
-  Variable<ConnectionType>* var_conn_type() override {
+  Variable<chromeos_update_engine::ConnectionType>* var_conn_type() override {
     return &var_conn_type_;
   }
 
-  Variable<ConnectionTethering>* var_conn_tethering() override {
+  Variable<chromeos_update_engine::ConnectionTethering>* var_conn_tethering() override {
     return &var_conn_tethering_;
   }
 
@@ -61,11 +61,6 @@
     return &var_conn_last_changed_;
   }
 
-  // Helper methods for converting shill strings into symbolic values.
-  static ConnectionType ParseConnectionType(const std::string& type_str);
-  static ConnectionTethering ParseConnectionTethering(
-      const std::string& tethering_str);
-
  private:
   // A handler for ManagerProxy.PropertyChanged signal.
   void OnManagerPropertyChanged(const std::string& name,
@@ -92,8 +87,10 @@
 
   // The provider's variables.
   AsyncCopyVariable<bool> var_is_connected_{"is_connected"};
-  AsyncCopyVariable<ConnectionType> var_conn_type_{"conn_type"};
-  AsyncCopyVariable<ConnectionTethering> var_conn_tethering_{"conn_tethering"};
+  AsyncCopyVariable<chromeos_update_engine::ConnectionType> var_conn_type_{
+      "conn_type"};
+  AsyncCopyVariable<chromeos_update_engine::ConnectionTethering>
+      var_conn_tethering_{"conn_tethering"};
   AsyncCopyVariable<base::Time> var_conn_last_changed_{"conn_last_changed"};
 
   DISALLOW_COPY_AND_ASSIGN(RealShillProvider);