update_engine: Add disconnected network type for metrics reporting

On a failed update, correctly report that the network is disconnected
rather than reporting an "unknown" network type, which is set when the
connection type cannot be determined based on the properties of a given
service path.

BUG=chromium:660283
TEST=Added relevant unittests. Also tested manually by updating via cros
flash, unplugging Ethernet after the transfer, and killing the
dev_server. Metrics sends "disconnected" as expected.

Change-Id: Ia681b769208b67fb5c14d41a646d816a42ccf33e
Reviewed-on: https://chromium-review.googlesource.com/1231700
Commit-Ready: Colin Howes <chowes@google.com>
Tested-by: Colin Howes <chowes@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/metrics_utils.cc b/metrics_utils.cc
index b85f257..018f2e4 100644
--- a/metrics_utils.cc
+++ b/metrics_utils.cc
@@ -247,6 +247,9 @@
     case ConnectionType::kUnknown:
       return metrics::ConnectionType::kUnknown;
 
+    case ConnectionType::kDisconnected:
+      return metrics::ConnectionType::kDisconnected;
+
     case ConnectionType::kEthernet:
       if (tethering == ConnectionTethering::kConfirmed)
         return metrics::ConnectionType::kTetheredEthernet;