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/metrics_utils.h b/metrics_utils.h
index 7c3b02d..d9826c1 100644
--- a/metrics_utils.h
+++ b/metrics_utils.h
@@ -17,7 +17,7 @@
 #ifndef UPDATE_ENGINE_METRICS_UTILS_H_
 #define UPDATE_ENGINE_METRICS_UTILS_H_
 
-#include "update_engine/connection_manager.h"
+#include "update_engine/connection_utils.h"
 #include "update_engine/metrics.h"
 
 namespace chromeos_update_engine {
@@ -39,8 +39,8 @@
 metrics::AttemptResult GetAttemptResult(ErrorCode code);
 
 // Calculates the internet connection type given |type| and |tethering|.
-metrics::ConnectionType GetConnectionType(NetworkConnectionType type,
-                                          NetworkTethering tethering);
+metrics::ConnectionType GetConnectionType(ConnectionType type,
+                                          ConnectionTethering tethering);
 
 // This function returns the duration on the wallclock since the last
 // time it was called for the same |state_variable_key| value.