update_engine: Convert NetworkConnectionType to enum class.

This patch simply converts the old NetworkConnectionType enum to an
enum class and updates all the callsites and formatting.

BUG=None
TEST=emerge-link update_engine.

Change-Id: I29a281f1648e2d8ef74b1046d01a212022280461
Reviewed-on: https://chromium-review.googlesource.com/289585
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/utils_unittest.cc b/utils_unittest.cc
index 4787e84..83ef485 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -682,50 +682,50 @@
 TEST(UtilsTest, GetConnectionType) {
   // Check that expected combinations map to the right value.
   EXPECT_EQ(metrics::ConnectionType::kUnknown,
-            utils::GetConnectionType(kNetUnknown,
+            utils::GetConnectionType(NetworkConnectionType::kUnknown,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kEthernet,
-            utils::GetConnectionType(kNetEthernet,
+            utils::GetConnectionType(NetworkConnectionType::kEthernet,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kWifi,
-            utils::GetConnectionType(kNetWifi,
+            utils::GetConnectionType(NetworkConnectionType::kWifi,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kWimax,
-            utils::GetConnectionType(kNetWimax,
+            utils::GetConnectionType(NetworkConnectionType::kWimax,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kBluetooth,
-            utils::GetConnectionType(kNetBluetooth,
+            utils::GetConnectionType(NetworkConnectionType::kBluetooth,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kCellular,
-            utils::GetConnectionType(kNetCellular,
+            utils::GetConnectionType(NetworkConnectionType::kCellular,
                                      NetworkTethering::kUnknown));
   EXPECT_EQ(metrics::ConnectionType::kTetheredEthernet,
-            utils::GetConnectionType(kNetEthernet,
+            utils::GetConnectionType(NetworkConnectionType::kEthernet,
                                      NetworkTethering::kConfirmed));
   EXPECT_EQ(metrics::ConnectionType::kTetheredWifi,
-            utils::GetConnectionType(kNetWifi,
+            utils::GetConnectionType(NetworkConnectionType::kWifi,
                                      NetworkTethering::kConfirmed));
 
   // Ensure that we don't report tethered ethernet unless it's confirmed.
   EXPECT_EQ(metrics::ConnectionType::kEthernet,
-            utils::GetConnectionType(kNetEthernet,
+            utils::GetConnectionType(NetworkConnectionType::kEthernet,
                                      NetworkTethering::kNotDetected));
   EXPECT_EQ(metrics::ConnectionType::kEthernet,
-            utils::GetConnectionType(kNetEthernet,
+            utils::GetConnectionType(NetworkConnectionType::kEthernet,
                                      NetworkTethering::kSuspected));
   EXPECT_EQ(metrics::ConnectionType::kEthernet,
-            utils::GetConnectionType(kNetEthernet,
+            utils::GetConnectionType(NetworkConnectionType::kEthernet,
                                      NetworkTethering::kUnknown));
 
   // Ditto for tethered wifi.
   EXPECT_EQ(metrics::ConnectionType::kWifi,
-            utils::GetConnectionType(kNetWifi,
+            utils::GetConnectionType(NetworkConnectionType::kWifi,
                                      NetworkTethering::kNotDetected));
   EXPECT_EQ(metrics::ConnectionType::kWifi,
-            utils::GetConnectionType(kNetWifi,
+            utils::GetConnectionType(NetworkConnectionType::kWifi,
                                      NetworkTethering::kSuspected));
   EXPECT_EQ(metrics::ConnectionType::kWifi,
-            utils::GetConnectionType(kNetWifi,
+            utils::GetConnectionType(NetworkConnectionType::kWifi,
                                      NetworkTethering::kUnknown));
 }