shill: Make Technology a fully-fledged class

Previously, Technology was not a real class, but instead essentially
served just as a namespace for static functions and an enum. Any
clients that wanted to use a "Technology" had to use a
Technology::Identifier instead. This change makes a Technology
instance a useful object that can be passed around.

BUG=None
TEST=All unit tests are passing.

Change-Id: I52810c9ad278f5190070eb1c257547f62034375c
Reviewed-on: https://chromium-review.googlesource.com/1708003
Tested-by: Alex Khouderchah <akhouderchah@chromium.org>
Commit-Ready: Alex Khouderchah <akhouderchah@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
diff --git a/shill/connection.cc b/shill/connection.cc
index b5955f9..e2f3fbf 100644
--- a/shill/connection.cc
+++ b/shill/connection.cc
@@ -84,7 +84,7 @@
 Connection::Connection(int interface_index,
                        const std::string& interface_name,
                        bool fixed_ip_params,
-                       Technology::Identifier technology,
+                       Technology technology,
                        const DeviceInfo* device_info,
                        ControlInterface* control_interface)
     : weak_ptr_factory_(this),
@@ -108,9 +108,8 @@
       routing_table_(RoutingTable::GetInstance()),
       rtnl_handler_(RTNLHandler::GetInstance()),
       control_interface_(control_interface) {
-  SLOG(this, 2) << __func__ << "(" << interface_index << ", "
-                << interface_name << ", "
-                << Technology::NameFromIdentifier(technology) << ")";
+  SLOG(this, 2) << __func__ << "(" << interface_index << ", " << interface_name
+                << ", " << technology << ")";
 }
 
 Connection::~Connection() {
@@ -161,8 +160,8 @@
   const IPConfig::Properties& properties = config->properties();
   allowed_uids_ = properties.allowed_uids;
   allowed_iifs_ = properties.allowed_iifs;
-  use_if_addrs_ = properties.use_if_addrs ||
-      Technology::IsPrimaryConnectivityTechnology(technology_);
+  use_if_addrs_ =
+      properties.use_if_addrs || technology_.IsPrimaryConnectivityTechnology();
 
   if (table_id_ == RT_TABLE_MAIN) {
     table_id_ = routing_table_->AllocTableId();
diff --git a/shill/connection.h b/shill/connection.h
index 4b37237..35f8f1b 100644
--- a/shill/connection.h
+++ b/shill/connection.h
@@ -75,7 +75,7 @@
   Connection(int interface_index,
              const std::string& interface_name,
              bool fixed_ip_params,
-             Technology::Identifier technology_,
+             Technology technology_,
              const DeviceInfo* device_info,
              ControlInterface* control_interface);
 
@@ -149,7 +149,7 @@
 
   virtual const IPAddress& local() const { return local_; }
   virtual const IPAddress& gateway() const { return gateway_; }
-  virtual Technology::Identifier technology() const { return technology_; }
+  virtual Technology technology() const { return technology_; }
   void set_allowed_addrs(std::vector<IPAddress> addresses);
   virtual const std::string& tethering() const { return tethering_; }
   void set_tethering(const std::string& tethering) { tethering_ = tethering; }
@@ -197,7 +197,7 @@
   int routing_request_count_;
   int interface_index_;
   const std::string interface_name_;
-  Technology::Identifier technology_;
+  Technology technology_;
   std::vector<std::string> dns_servers_;
   std::vector<std::string> dns_domain_search_;
   std::vector<std::string> excluded_ips_cidr_;
diff --git a/shill/connection_test.cc b/shill/connection_test.cc
index 5c9c6d2..43fc5d1 100644
--- a/shill/connection_test.cc
+++ b/shill/connection_test.cc
@@ -171,12 +171,10 @@
     connection_->local_ = local;
   }
 
-  scoped_refptr<MockDevice> CreateDevice(Technology::Identifier technology) {
+  scoped_refptr<MockDevice> CreateDevice(Technology technology) {
     scoped_refptr<MockDevice> device = new StrictMock<MockDevice>(
-          &manager_,
-          "test_" + Technology::NameFromIdentifier(technology),
-          std::string(),
-          kDeviceInterfaceIndexBase + static_cast<int>(technology));
+        &manager_, "test_" + technology.GetName(), std::string(),
+        kDeviceInterfaceIndexBase + static_cast<int>(technology));
     EXPECT_CALL(*device, technology()).WillRepeatedly(
       Return(technology));
     EXPECT_CALL(*device_info_, GetDevice(device->interface_index()))
diff --git a/shill/device.cc b/shill/device.cc
index 74740a3..4c7803f 100644
--- a/shill/device.cc
+++ b/shill/device.cc
@@ -128,7 +128,7 @@
                const string& link_name,
                const string& address,
                int interface_index,
-               Technology::Identifier technology)
+               Technology technology)
     : enabled_(false),
       enabled_persistent_(true),
       enabled_pending_(enabled_),
@@ -418,7 +418,7 @@
 }
 
 string Device::GetTechnologyString(Error* /*error*/) {
-  return Technology::NameFromIdentifier(technology());
+  return technology().GetName();
 }
 
 const string& Device::UniqueName() const {
@@ -1900,9 +1900,8 @@
   SLOG(this, 2) << "Device " << link_name_ << " "
                 << (enable ? "starting" : "stopping");
   if (enable && manager_->IsTechnologyProhibited(technology())) {
-    error->Populate(Error::kPermissionDenied, "The " +
-                    Technology::NameFromIdentifier(technology()) +
-                    " technology is prohibited");
+    error->Populate(Error::kPermissionDenied, "The " + technology().GetName() +
+                                                  " technology is prohibited");
     return;
   }
 
diff --git a/shill/device.h b/shill/device.h
index 5ee395f..f75a39f 100644
--- a/shill/device.h
+++ b/shill/device.h
@@ -53,7 +53,7 @@
          const std::string& link_name,
          const std::string& address,
          int interface_index,
-         Technology::Identifier technology);
+         Technology technology);
 
   // Initialize type-specific network interface properties.
   virtual void Initialize();
@@ -217,7 +217,7 @@
   virtual const ConnectionRefPtr& connection() const { return connection_; }
   bool enabled() const { return enabled_; }
   bool enabled_persistent() const { return enabled_persistent_; }
-  virtual Technology::Identifier technology() const { return technology_; }
+  virtual Technology technology() const { return technology_; }
   std::string GetTechnologyString(Error* error);
 
   virtual const IPConfigRefPtr& ipconfig() const { return ipconfig_; }
@@ -825,7 +825,7 @@
   // DNS servers obtained from ipconfig (either from DHCP or static config)
   // that are not working.
   std::vector<std::string> config_dns_servers_;
-  Technology::Identifier technology_;
+  Technology technology_;
 
   int portal_check_interval_seconds_;
 
diff --git a/shill/device_info.cc b/shill/device_info.cc
index 10ddc7e..0763796 100644
--- a/shill/device_info.cc
+++ b/shill/device_info.cc
@@ -219,20 +219,20 @@
 
 vector<string> DeviceInfo::GetUninitializedTechnologies() const {
   set<string> unique_technologies;
-  set<Technology::Identifier> initialized_technologies;
+  set<Technology> initialized_technologies;
   for (const auto& info : infos_) {
-    Technology::Identifier technology = info.second.technology;
+    Technology technology = info.second.technology;
     if (info.second.device) {
       // If there is more than one device for a technology and at least
       // one of them has been initialized, make sure that it doesn't get
       // listed as uninitialized.
       initialized_technologies.insert(technology);
-      unique_technologies.erase(Technology::NameFromIdentifier(technology));
+      unique_technologies.erase(technology.GetName());
       continue;
     }
-    if (Technology::IsPrimaryConnectivityTechnology(technology) &&
+    if (technology.IsPrimaryConnectivityTechnology() &&
         !base::ContainsKey(initialized_technologies, technology))
-      unique_technologies.insert(Technology::NameFromIdentifier(technology));
+      unique_technologies.insert(technology.GetName());
   }
   return vector<string>(unique_technologies.begin(), unique_technologies.end());
 }
@@ -250,7 +250,7 @@
   } else {
     metrics()->RegisterDevice(device->interface_index(), device->technology());
   }
-  if (Technology::IsPrimaryConnectivityTechnology(device->technology())) {
+  if (device->technology().IsPrimaryConnectivityTechnology()) {
     manager_->RegisterDevice(device);
   }
 }
@@ -306,8 +306,7 @@
   return arp_type;
 }
 
-Technology::Identifier DeviceInfo::GetDeviceTechnology(
-    const string& iface_name) {
+Technology DeviceInfo::GetDeviceTechnology(const string& iface_name) {
   int arp_type = GetDeviceArpType(iface_name);
 
   if (IsGuestDevice(iface_name)) {
@@ -502,7 +501,7 @@
 DeviceRefPtr DeviceInfo::CreateDevice(const string& link_name,
                                       const string& address,
                                       int interface_index,
-                                      Technology::Identifier technology) {
+                                      Technology technology) {
   DeviceRefPtr device;
   delayed_devices_.erase(interface_index);
   infos_[interface_index].technology = technology;
@@ -657,7 +656,7 @@
   DCHECK(msg.type() == RTNLMessage::kTypeLink &&
          msg.mode() == RTNLMessage::kModeAdd);
   int dev_index = msg.interface_index();
-  Technology::Identifier technology = Technology::kUnknown;
+  Technology technology = Technology::kUnknown;
   unsigned int flags = msg.link_status().flags;
   unsigned int change = msg.link_status().change;
 
@@ -1208,7 +1207,7 @@
     DCHECK(!GetDevice(dev_index));
 
     const string& link_name = infos_[dev_index].name;
-    Technology::Identifier technology = GetDeviceTechnology(link_name);
+    Technology technology = GetDeviceTechnology(link_name);
 
     if (technology == Technology::kCDCEthernet) {
       LOG(INFO) << "In " << __func__ << ": device " << link_name
@@ -1231,8 +1230,7 @@
     } else if (technology != Technology::kCellular &&
                technology != Technology::kTunnel) {
       LOG(WARNING) << "In " << __func__ << ": device " << link_name
-                   << " is unexpected technology "
-                   << Technology::NameFromIdentifier(technology);
+                   << " is unexpected technology " << technology;
     }
 
     string address = infos_[dev_index].mac_address.HexEncode();
diff --git a/shill/device_info.h b/shill/device_info.h
index 23f6bea..3491dcc 100644
--- a/shill/device_info.h
+++ b/shill/device_info.h
@@ -178,7 +178,7 @@
     // only the ip_addresses field is valid.
     bool has_addresses_only;
 
-    Technology::Identifier technology;
+    Technology technology;
   };
 
   // Create a Device object for the interface named |linkname|, with a
@@ -187,7 +187,7 @@
   virtual DeviceRefPtr CreateDevice(const std::string& link_name,
                                     const std::string& address,
                                     int interface_index,
-                                    Technology::Identifier technology);
+                                    Technology technology);
 
   // Return the ARP type (ARPHRD_* from <net/if_arp.h>) of interface
   // |iface_name|.
@@ -211,8 +211,7 @@
                                  base::FilePath* path_out);
   // Classify the device named |iface_name|, and return an identifier
   // indicating its type.
-  virtual Technology::Identifier GetDeviceTechnology(
-      const std::string& iface_name);
+  virtual Technology GetDeviceTechnology(const std::string& iface_name);
   // Checks the device specified by |iface_name| to see if it's a modem device.
   // This method assumes that |iface_name| has already been determined to be
   // using the cdc_ether / cdc_ncm driver.
diff --git a/shill/device_info_test.cc b/shill/device_info_test.cc
index 1b6ea4e..3ae155f 100644
--- a/shill/device_info_test.cc
+++ b/shill/device_info_test.cc
@@ -110,7 +110,7 @@
   DeviceRefPtr CreateDevice(const std::string& link_name,
                             const std::string& address,
                             int interface_index,
-                            Technology::Identifier technology) {
+                            Technology technology) {
     return device_info_.CreateDevice(link_name, address, interface_index,
                                      technology);
   }
@@ -362,15 +362,13 @@
 
   device_info_.infos_[1].technology = Technology::kCellular;
   technologies = device_info_.GetUninitializedTechnologies();
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kCellular));
+  expected_technologies.insert(Technology(Technology::kCellular).GetName());
   EXPECT_THAT(set<string>(technologies.begin(), technologies.end()),
               ContainerEq(expected_technologies));
 
   device_info_.infos_[2].technology = Technology::kWifi;
   technologies = device_info_.GetUninitializedTechnologies();
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kWifi));
+  expected_technologies.insert(Technology(Technology::kWifi).GetName());
   EXPECT_THAT(set<string>(technologies.begin(), technologies.end()),
               ContainerEq(expected_technologies));
 
@@ -378,8 +376,7 @@
       new MockDevice(&manager_, "null0", "addr0", 1));
   device_info_.infos_[1].device = device;
   technologies = device_info_.GetUninitializedTechnologies();
-  expected_technologies.erase(Technology::NameFromIdentifier(
-      Technology::kCellular));
+  expected_technologies.erase(Technology(Technology::kCellular).GetName());
   EXPECT_THAT(set<string>(technologies.begin(), technologies.end()),
               ContainerEq(expected_technologies));
 
@@ -542,8 +539,8 @@
   MockVPNProvider* vpn_provider = new StrictMock<MockVPNProvider>;
   SetVPNProvider(vpn_provider);
   EXPECT_CALL(*vpn_provider,
-              OnDeviceInfoAvailable(
-                  kTestDeviceName, kTestDeviceIndex, Technology::kTunnel))
+              OnDeviceInfoAvailable(kTestDeviceName, kTestDeviceIndex,
+                                    Technology(Technology::kTunnel)))
       .WillOnce(Return(true));
   EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceIndex)).Times(1);
   EXPECT_CALL(rtnl_handler_, RemoveInterfaceAddress(kTestDeviceIndex,
@@ -560,8 +557,8 @@
   MockVPNProvider* vpn_provider = new StrictMock<MockVPNProvider>;
   SetVPNProvider(vpn_provider);
   EXPECT_CALL(*vpn_provider,
-              OnDeviceInfoAvailable(
-                  kTestDeviceName, kTestDeviceIndex, Technology::kTunnel))
+              OnDeviceInfoAvailable(kTestDeviceName, kTestDeviceIndex,
+                                    Technology(Technology::kTunnel)))
       .WillOnce(Return(false));
   EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceIndex)).Times(1);
   EXPECT_CALL(rtnl_handler_, RemoveInterfaceAddress(kTestDeviceIndex,
@@ -580,8 +577,8 @@
   MockVPNProvider* vpn_provider = new StrictMock<MockVPNProvider>;
   SetVPNProvider(vpn_provider);
   EXPECT_CALL(*vpn_provider,
-              OnDeviceInfoAvailable(
-                  kTestDeviceName, kTestDeviceIndex, Technology::kPPP))
+              OnDeviceInfoAvailable(kTestDeviceName, kTestDeviceIndex,
+                                    Technology(Technology::kPPP)))
       .WillOnce(Return(false));
   EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceIndex)).Times(1);
   EXPECT_CALL(rtnl_handler_, RemoveInterfaceAddress(kTestDeviceIndex,
@@ -1322,7 +1319,7 @@
     CreateInfoFile("uevent", "xxx");
   }
 
-  Technology::Identifier GetDeviceTechnology() {
+  Technology GetDeviceTechnology() {
     return device_info_.GetDeviceTechnology(test_device_name_);
   }
   FilePath GetInfoPath(const string& name);
@@ -1523,12 +1520,12 @@
  public:
   explicit DeviceInfoForDelayedCreationTest(Manager* manager)
       : DeviceInfo(manager) {}
-  MOCK_METHOD4(CreateDevice, DeviceRefPtr(const std::string& link_name,
-                                          const std::string& address,
-                                          int interface_index,
-                                          Technology::Identifier technology));
-  MOCK_METHOD1(GetDeviceTechnology,
-               Technology::Identifier(const string& iface_name));
+  MOCK_METHOD4(CreateDevice,
+               DeviceRefPtr(const std::string& link_name,
+                            const std::string& address,
+                            int interface_index,
+                            Technology technology));
+  MOCK_METHOD1(GetDeviceTechnology, Technology(const string& iface_name));
 };
 
 class DeviceInfoDelayedCreationTest : public DeviceInfoTest {
@@ -1544,7 +1541,7 @@
     test_device_info_.DelayedDeviceCreationTask();
   }
 
-  void AddDelayedDevice(Technology::Identifier delayed_technology) {
+  void AddDelayedDevice(Technology delayed_technology) {
     unique_ptr<RTNLMessage> message = BuildLinkMessage(RTNLMessage::kModeAdd);
     EXPECT_CALL(test_device_info_, GetDeviceTechnology(kTestDeviceName))
         .WillOnce(Return(delayed_technology));
@@ -1559,8 +1556,8 @@
     GetDelayedDevices().insert(kTestDeviceIndex);
   }
 
-  void EnsureDelayedDevice(Technology::Identifier reported_device_technology,
-                           Technology::Identifier created_device_technology) {
+  void EnsureDelayedDevice(Technology reported_device_technology,
+                           Technology created_device_technology) {
     EXPECT_CALL(test_device_info_, GetDeviceTechnology(_))
         .WillOnce(Return(reported_device_technology));
     EXPECT_CALL(test_device_info_, CreateDevice(
diff --git a/shill/device_stub.h b/shill/device_stub.h
index 3c1f404..c27c0a5 100644
--- a/shill/device_stub.h
+++ b/shill/device_stub.h
@@ -22,7 +22,7 @@
              const std::string& link_name,
              const std::string& address,
              int interface_index,
-             Technology::Identifier technology)
+             Technology technology)
       : Device(manager, link_name, address, interface_index, technology) {}
   void Start(Error* /*error*/,
              const EnabledStateChangedCallback& /*callback*/) override {}
diff --git a/shill/device_test.cc b/shill/device_test.cc
index d3e7203..ed4db7c 100644
--- a/shill/device_test.cc
+++ b/shill/device_test.cc
@@ -77,7 +77,7 @@
              const std::string& link_name,
              const std::string& address,
              int interface_index,
-             Technology::Identifier technology)
+             Technology technology)
       : Device(manager, link_name, address, interface_index, technology) {
     ON_CALL(*this, IsIPv6Allowed())
         .WillByDefault(Invoke(this, &TestDevice::DeviceIsIPv6Allowed));
@@ -1113,7 +1113,8 @@
   SetLinkMonitor(link_monitor);  // Passes ownership.
   SetManager(&manager);
   EXPECT_CALL(*link_monitor, Start()).Times(0);
-  EXPECT_CALL(manager, IsTechnologyLinkMonitorEnabled(Technology::kUnknown))
+  EXPECT_CALL(manager,
+              IsTechnologyLinkMonitorEnabled(Technology(Technology::kUnknown)))
       .WillOnce(Return(false))
       .WillRepeatedly(Return(true));
   EXPECT_FALSE(StartLinkMonitor());
diff --git a/shill/eap_credentials.cc b/shill/eap_credentials.cc
index 46516a6..02626ae 100644
--- a/shill/eap_credentials.cc
+++ b/shill/eap_credentials.cc
@@ -279,8 +279,8 @@
   storage->GetBool(id, kStorageEapUseSystemCAs, &use_system_cas_);
 }
 
-void EapCredentials::OutputConnectionMetrics(
-    Metrics* metrics, Technology::Identifier technology) const {
+void EapCredentials::OutputConnectionMetrics(Metrics* metrics,
+                                             Technology technology) const {
   Metrics::EapOuterProtocol outer_protocol =
       Metrics::EapOuterProtocolStringToEnum(eap_);
   metrics->SendEnumToUMA(
diff --git a/shill/eap_credentials.h b/shill/eap_credentials.h
index 373649a..316fda7 100644
--- a/shill/eap_credentials.h
+++ b/shill/eap_credentials.h
@@ -50,7 +50,7 @@
   // Output metrics about this EAP connection to |metrics| with technology
   // |technology|.
   virtual void OutputConnectionMetrics(Metrics* metrics,
-                                       Technology::Identifier technology) const;
+                                       Technology technology) const;
 
   // Populate the wpa_supplicant DBus parameter map |params| with the
   // credentials in |this|.  To do so, this function may use |certificate_file|
diff --git a/shill/ethernet/ethernet_eap_service.cc b/shill/ethernet/ethernet_eap_service.cc
index b612598..2a677a7 100644
--- a/shill/ethernet/ethernet_eap_service.cc
+++ b/shill/ethernet/ethernet_eap_service.cc
@@ -26,8 +26,7 @@
 EthernetEapService::~EthernetEapService() = default;
 
 string EthernetEapService::GetStorageIdentifier() const {
-  return base::StringPrintf(
-      "%s_all", Technology::NameFromIdentifier(technology()).c_str());
+  return base::StringPrintf("%s_all", technology().GetName().c_str());
 }
 
 RpcIdentifier EthernetEapService::GetDeviceRpcId(Error* /*error*/) const {
diff --git a/shill/ethernet/ethernet_service.cc b/shill/ethernet/ethernet_service.cc
index af69170..2d17684 100644
--- a/shill/ethernet/ethernet_service.cc
+++ b/shill/ethernet/ethernet_service.cc
@@ -42,7 +42,7 @@
 }
 
 EthernetService::EthernetService(Manager* manager,
-                                 Technology::Identifier technology,
+                                 Technology technology,
                                  const Properties& props)
     : Service(manager, technology), props_(props) {}
 
@@ -85,10 +85,8 @@
 
 string EthernetService::GetStorageIdentifier() const {
   return props_.ethernet_
-             ? base::StringPrintf(
-                   "%s_%s",
-                   Technology::NameFromIdentifier(technology()).c_str(),
-                   props_.ethernet_->address().c_str())
+             ? base::StringPrintf("%s_%s", technology().GetName().c_str(),
+                                  props_.ethernet_->address().c_str())
              : props_.storage_id_;
 }
 
diff --git a/shill/ethernet/ethernet_service.h b/shill/ethernet/ethernet_service.h
index 6beb708..0498c47 100644
--- a/shill/ethernet/ethernet_service.h
+++ b/shill/ethernet/ethernet_service.h
@@ -64,7 +64,7 @@
   // EthernetService behavior, while still retaining their own technology
   // identifier.
   EthernetService(Manager* manager,
-                  Technology::Identifier technology,
+                  Technology technology,
                   const Properties& props);
 
   void SetUp();
diff --git a/shill/ethernet/ethernet_test.cc b/shill/ethernet/ethernet_test.cc
index 798b08d..1785578 100644
--- a/shill/ethernet/ethernet_test.cc
+++ b/shill/ethernet/ethernet_test.cc
@@ -563,10 +563,10 @@
   EXPECT_CALL(manager_, DeregisterService(TechnologyEq(Technology::kPPPoE)));
   EXPECT_CALL(manager_, RegisterService(_));
 
-  const vector<pair<bool, Technology::Identifier>> transitions = {
-    {false, Technology::kEthernet},
-    {true,  Technology::kPPPoE},
-    {false, Technology::kEthernet},
+  const vector<pair<bool, Technology>> transitions = {
+      {false, Technology::kEthernet},
+      {true, Technology::kPPPoE},
+      {false, Technology::kEthernet},
   };
   for (const auto& transition : transitions) {
     Error error;
diff --git a/shill/ethernet/mock_ethernet_service.h b/shill/ethernet/mock_ethernet_service.h
index 64930f8..073def8 100644
--- a/shill/ethernet/mock_ethernet_service.h
+++ b/shill/ethernet/mock_ethernet_service.h
@@ -35,7 +35,7 @@
   MOCK_METHOD1(SetFailureSilent, void(ConnectFailure failure));
   MOCK_METHOD1(SetState, void(ConnectState state));
   MOCK_METHOD0(OnVisibilityChanged, void());
-  MOCK_CONST_METHOD0(technology, Technology::Identifier());
+  MOCK_CONST_METHOD0(technology, Technology());
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockEthernetService);
diff --git a/shill/manager.cc b/shill/manager.cc
index 5746574..bdf5e25 100644
--- a/shill/manager.cc
+++ b/shill/manager.cc
@@ -115,7 +115,7 @@
 // user has logged in. This is particularly problematic for cellular services,
 // which may incur data cost. To err on the side of caution, we temporarily
 // disable auto-connect for cellular before a user session has started.
-const Technology::Identifier kNoAutoConnectTechnologiesBeforeLoggedIn[] = {
+const Technology kNoAutoConnectTechnologiesBeforeLoggedIn[] = {
     Technology::kCellular,
 };
 
@@ -845,8 +845,7 @@
 
 ServiceRefPtr Manager::CreateTemporaryServiceFromProfile(
     const ProfileRefPtr& profile, const std::string& entry_name, Error* error) {
-  Technology::Identifier technology =
-      Technology::IdentifierFromStorageGroup(entry_name);
+  Technology technology = Technology::CreateFromStorageGroup(entry_name);
   if (technology == Technology::kUnknown) {
     Error::PopulateAndLog(
         FROM_HERE, error, Error::kInternalError,
@@ -910,18 +909,18 @@
 }
 
 bool Manager::IsTechnologyInList(const string& technology_list,
-                                 Technology::Identifier tech) const {
+                                 Technology tech) const {
   if (technology_list.empty())
     return false;
 
   Error error;
-  vector<Technology::Identifier> technologies;
-  return Technology::GetTechnologyVectorFromString(technology_list,
-                                                   &technologies, &error) &&
+  vector<Technology> technologies;
+  return GetTechnologyVectorFromString(technology_list, &technologies,
+                                       &error) &&
          base::ContainsValue(technologies, tech);
 }
 
-bool Manager::IsPortalDetectionEnabled(Technology::Identifier tech) {
+bool Manager::IsPortalDetectionEnabled(Technology tech) {
   return IsTechnologyInList(GetCheckPortalList(nullptr), tech);
 }
 
@@ -949,13 +948,11 @@
   return service->profile() == ephemeral_profile_;
 }
 
-bool Manager::IsTechnologyLinkMonitorEnabled(
-    Technology::Identifier technology) const {
+bool Manager::IsTechnologyLinkMonitorEnabled(Technology technology) const {
   return IsTechnologyInList(props_.link_monitor_technologies, technology);
 }
 
-bool Manager::IsTechnologyAutoConnectDisabled(
-    Technology::Identifier technology) const {
+bool Manager::IsTechnologyAutoConnectDisabled(Technology technology) const {
   if (!has_user_session_) {
     for (auto disabled_technology : kNoAutoConnectTechnologiesBeforeLoggedIn) {
       if (technology == disabled_technology)
@@ -965,8 +962,7 @@
   return IsTechnologyInList(props_.no_auto_connect_technologies, technology);
 }
 
-bool Manager::IsTechnologyProhibited(
-    Technology::Identifier technology) const {
+bool Manager::IsTechnologyProhibited(Technology technology) const {
   return IsTechnologyInList(props_.prohibited_technologies, technology);
 }
 
@@ -977,7 +973,7 @@
 }
 
 DeviceRefPtr Manager::GetEnabledDeviceWithTechnology(
-    Technology::Identifier technology) const {
+    Technology technology) const {
   for (const auto& device : FilterByTechnology(technology)) {
     if (device->enabled()) {
       return device;
@@ -1063,7 +1059,7 @@
                                            const ResultCallback& callback) {
   CHECK(error);
   DCHECK(error->IsOngoing());
-  Technology::Identifier id = Technology::IdentifierFromName(technology_name);
+  Technology id = Technology::CreateFromName(technology_name);
   if (id == Technology::kUnknown) {
     error->Populate(Error::kInvalidArguments, "Unknown technology");
     return;
@@ -1210,7 +1206,7 @@
   UpdateDevice(to_manage);
 
   if (network_throttling_enabled_ &&
-      Technology::IsPrimaryConnectivityTechnology(to_manage->technology())) {
+      to_manage->technology().IsPrimaryConnectivityTechnology()) {
     if (devices_.size() == 1) {
       ResultCallback dummy;
       throttler_->ThrottleInterfaces(dummy, upload_rate_kbits_,
@@ -1328,10 +1324,9 @@
 
 bool Manager::SetProhibitedTechnologies(const string& prohibited_technologies,
                                         Error* error) {
-  vector<Technology::Identifier> technology_vector;
-  if (!Technology::GetTechnologyVectorFromString(prohibited_technologies,
-                                                 &technology_vector,
-                                                 error)) {
+  vector<Technology> technology_vector;
+  if (!GetTechnologyVectorFromString(prohibited_technologies,
+                                     &technology_vector, error)) {
     return false;
   }
   for (const auto& technology : technology_vector) {
@@ -1339,21 +1334,17 @@
     ResultCallback result_callback(Bind(
         &Manager::OnTechnologyProhibited, Unretained(this), technology));
     const bool kPersistentSave = false;
-    SetEnabledStateForTechnology(Technology::NameFromIdentifier(technology),
-                                 false,
-                                 kPersistentSave,
-                                 &unused_error,
-                                 result_callback);
+    SetEnabledStateForTechnology(technology.GetName(), false, kPersistentSave,
+                                 &unused_error, result_callback);
   }
   props_.prohibited_technologies = prohibited_technologies;
 
   return true;
 }
 
-void Manager::OnTechnologyProhibited(Technology::Identifier technology,
+void Manager::OnTechnologyProhibited(Technology technology,
                                      const Error& error) {
-  SLOG(this, 2) << __func__ << " for "
-                << Technology::NameFromIdentifier(technology);
+  SLOG(this, 2) << __func__ << " for " << technology;
 }
 
 string Manager::GetProhibitedTechnologies(Error* error) {
@@ -1678,9 +1669,7 @@
   power_manager_->ReportDarkSuspendReadiness();
 }
 
-
-vector<DeviceRefPtr>
-Manager::FilterByTechnology(Technology::Identifier tech) const {
+vector<DeviceRefPtr> Manager::FilterByTechnology(Technology tech) const {
   vector<DeviceRefPtr> found;
   for (const auto& device : devices_) {
     if (device->technology() == tech)
@@ -1860,8 +1849,8 @@
 
   for (const auto& technology : kProbeTechnologies) {
     bool presence = base::ContainsValue(available_technologies, technology);
-    metrics_->NotifyDevicePresenceStatus(
-        Technology::IdentifierFromName(technology), presence);
+    metrics_->NotifyDevicePresenceStatus(Technology::CreateFromName(technology),
+                                         presence);
   }
 }
 
@@ -1953,7 +1942,7 @@
   const bool kCompareConnectivityState = false;
   sort(services_copy.begin(), services_copy.end(),
        ServiceSorter(this, kCompareConnectivityState, technology_order_));
-  set<Technology::Identifier> connecting_technologies;
+  set<Technology> connecting_technologies;
   for (const auto& service : services_copy) {
     if (!service->connectable()) {
       // Due to service sort order, it is guaranteed that no services beyond
@@ -1963,9 +1952,8 @@
     if (!service->auto_connect() || !service->IsVisible()) {
       continue;
     }
-    Technology::Identifier technology = service->technology();
-    if (!Technology::IsPrimaryConnectivityTechnology(technology) &&
-        !IsConnected()) {
+    Technology technology = service->technology();
+    if (!technology.IsPrimaryConnectivityTechnology() && !IsConnected()) {
       // Non-primary services need some other service connected first.
       continue;
     }
@@ -2094,8 +2082,7 @@
 vector<string> Manager::AvailableTechnologies(Error* /*error*/) {
   set<string> unique_technologies;
   for (const auto& device : devices_) {
-    unique_technologies.insert(
-        Technology::NameFromIdentifier(device->technology()));
+    unique_technologies.insert(device->technology().GetName());
   }
   return vector<string>(unique_technologies.begin(), unique_technologies.end());
 }
@@ -2104,13 +2091,12 @@
   set<string> unique_technologies;
   for (const auto& device : devices_) {
     if (device->IsConnected())
-      unique_technologies.insert(
-          Technology::NameFromIdentifier(device->technology()));
+      unique_technologies.insert(device->technology().GetName());
   }
   return vector<string>(unique_technologies.begin(), unique_technologies.end());
 }
 
-bool Manager::IsTechnologyConnected(Technology::Identifier technology) const {
+bool Manager::IsTechnologyConnected(Technology technology) const {
   for (const auto& device : devices_) {
     if (device->technology() == technology && device->IsConnected())
       return true;
@@ -2127,8 +2113,7 @@
   set<string> unique_technologies;
   for (const auto& device : devices_) {
     if (device->enabled())
-      unique_technologies.insert(
-          Technology::NameFromIdentifier(device->technology()));
+      unique_technologies.insert(device->technology().GetName());
   }
   return vector<string>(unique_technologies.begin(), unique_technologies.end());
 }
@@ -2270,7 +2255,7 @@
   }
 
   string type = args.GetString(kTypeProperty);
-  Technology::Identifier technology = Technology::IdentifierFromName(type);
+  Technology technology = Technology::CreateFromName(type);
   if (!base::ContainsKey(providers_, technology)) {
     Error::PopulateAndLog(FROM_HERE, error, Error::kNotSupported,
                           kErrorUnsupportedServiceType);
@@ -2363,7 +2348,7 @@
   }
 
   string type = args.GetString(kTypeProperty);
-  Technology::Identifier technology = Technology::IdentifierFromName(type);
+  Technology technology = Technology::CreateFromName(type);
 
   if (!base::ContainsKey(providers_, technology)) {
     Error::PopulateAndLog(FROM_HERE, error, Error::kNotSupported,
@@ -2480,7 +2465,7 @@
   // Note that |services_| is kept sorted in order of highest priority to
   // lowest.
   for (const auto& service : services_) {
-    if (Technology::IsPrimaryConnectivityTechnology(service->technology())) {
+    if (service->technology().IsPrimaryConnectivityTechnology()) {
       return service;
     }
   }
@@ -2554,7 +2539,7 @@
 }
 
 void Manager::RequestScan(const string& technology, Error* error) {
-  Technology::Identifier technology_identifier;
+  Technology technology_identifier;
   // TODO(benchan): To maintain backward compatibility, we treat an unspecified
   // technology as WiFi. We should remove this special handling and treat an
   // unspecified technology as an error after we update existing clients of
@@ -2562,7 +2547,7 @@
   if (technology.empty()) {
     technology_identifier = Technology::kWifi;
   } else {
-    technology_identifier = Technology::IdentifierFromName(technology);
+    technology_identifier = Technology::CreateFromName(technology);
   }
 
   switch (technology_identifier) {
@@ -2607,16 +2592,16 @@
 string Manager::GetTechnologyOrder() {
   vector<string> technology_names;
   for (const auto& technology : technology_order_) {
-    technology_names.push_back(Technology::NameFromIdentifier(technology));
+    technology_names.push_back(technology.GetName());
   }
 
   return base::JoinString(technology_names, ",");
 }
 
 void Manager::SetTechnologyOrder(const string& order, Error* error) {
-  vector<Technology::Identifier> new_order;
+  vector<Technology> new_order;
   SLOG(this, 2) << "Setting technology order to " << order;
-  if (!Technology::GetTechnologyVectorFromString(order, &new_order, error)) {
+  if (!GetTechnologyVectorFromString(order, &new_order, error)) {
     return;
   }
 
@@ -2657,8 +2642,8 @@
   std::vector<std::string> interfaces;
 
   for (const auto& device : devices_) {
-    Technology::Identifier technology = device->technology();
-    if (Technology::IsPrimaryConnectivityTechnology(technology)) {
+    Technology technology = device->technology();
+    if (technology.IsPrimaryConnectivityTechnology()) {
       interfaces.push_back(device->link_name());
       SLOG(this, 4) << "Adding device: " << device->link_name();
     }
diff --git a/shill/manager.h b/shill/manager.h
index 59f3014..9ca7b02 100644
--- a/shill/manager.h
+++ b/shill/manager.h
@@ -159,8 +159,7 @@
   virtual void UpdateWiFiProvider();
 #endif  // DISABLE_WIFI
 
-  std::vector<DeviceRefPtr>
-      FilterByTechnology(Technology::Identifier tech) const;
+  std::vector<DeviceRefPtr> FilterByTechnology(Technology tech) const;
 
   ServiceRefPtr FindService(const std::string& name);
   RpcIdentifiers EnumerateAvailableServices(Error* error);
@@ -296,7 +295,7 @@
                                     Error* error,
                                     const ResultCallback& callback);
   // Return whether a technology is marked as enabled for portal detection.
-  virtual bool IsPortalDetectionEnabled(Technology::Identifier tech);
+  virtual bool IsPortalDetectionEnabled(Technology tech);
   // Set the start-up value for the portal detection list.  This list will
   // be used until a value set explicitly over the control API.  Until
   // then, we ignore but do not overwrite whatever value is stored in the
@@ -312,28 +311,26 @@
   virtual bool IsServiceEphemeral(const ServiceConstRefPtr& service) const;
 
   // Return whether a Technology has any connected Services.
-  virtual bool IsTechnologyConnected(Technology::Identifier technology) const;
+  virtual bool IsTechnologyConnected(Technology technology) const;
 
   // Return whether a technology is enabled for link monitoring.
-  virtual bool IsTechnologyLinkMonitorEnabled(
-      Technology::Identifier technology) const;
+  virtual bool IsTechnologyLinkMonitorEnabled(Technology technology) const;
 
   // Return whether the Wake on LAN feature is enabled.
   virtual bool IsWakeOnLanEnabled() const { return is_wake_on_lan_enabled_; }
 
   // Return whether a technology is disabled for auto-connect.
-  virtual bool IsTechnologyAutoConnectDisabled(
-      Technology::Identifier technology) const;
+  virtual bool IsTechnologyAutoConnectDisabled(Technology technology) const;
 
   // Report whether |technology| is prohibited from being enabled.
-  virtual bool IsTechnologyProhibited(Technology::Identifier technology) const;
+  virtual bool IsTechnologyProhibited(Technology technology) const;
 
   // Called by Profile when a |storage| completes initialization.
   void OnProfileStorageInitialized(Profile* storage);
 
   // Return a Device with technology |technology| in the enabled state.
   virtual DeviceRefPtr GetEnabledDeviceWithTechnology(
-      Technology::Identifier technology) const;
+      Technology technology) const;
 
   // Return a Device with link_name |link_name| in the enabled state.
   virtual DeviceRefPtr GetEnabledDeviceByLinkName(
@@ -607,7 +604,7 @@
   bool SetPortalFallbackUrlsString(const std::string& urls, Error* error);
   void EmitDefaultService();
   bool IsTechnologyInList(const std::string& technology_list,
-                          Technology::Identifier tech) const;
+                          Technology tech) const;
   void EmitDeviceProperties();
 #if !defined(DISABLE_WIFI)
   bool SetDisableWiFiVHT(const bool& disable_wifi_vht, Error* error);
@@ -616,8 +613,7 @@
   bool SetProhibitedTechnologies(const std::string& prohibited_technologies,
                                  Error* error);
   std::string GetProhibitedTechnologies(Error* error);
-  void OnTechnologyProhibited(Technology::Identifier technology,
-                              const Error& error);
+  void OnTechnologyProhibited(Technology technology, const Error& error);
 
   // For every device instance that is sharing the same connectivity with
   // another device, enable the multi-home flag.
@@ -778,7 +774,7 @@
   // Map of technologies to Provider instances.  These pointers are owned
   // by the respective scoped_reptr objects that are held over the lifetime
   // of the Manager object.
-  std::map<Technology::Identifier, ProviderInterface*> providers_;
+  std::map<Technology, ProviderInterface*> providers_;
   // List of startup profile names to push on the profile stack on startup.
   std::vector<ProfileRefPtr> profiles_;
   ProfileRefPtr ephemeral_profile_;
@@ -786,7 +782,7 @@
   std::unique_ptr<Upstart> upstart_;
 
   // The priority order of technologies
-  std::vector<Technology::Identifier> technology_order_;
+  std::vector<Technology> technology_order_;
 
   // This is the last Service RPC Identifier for which we emitted a
   // "DefaultService" signal for.
diff --git a/shill/manager_test.cc b/shill/manager_test.cc
index 9b52cfa..70d2f8b 100644
--- a/shill/manager_test.cc
+++ b/shill/manager_test.cc
@@ -153,8 +153,7 @@
     mock_devices_.clear();
   }
 
-  bool IsDeviceRegistered(const DeviceRefPtr& device,
-                          Technology::Identifier tech) {
+  bool IsDeviceRegistered(const DeviceRefPtr& device, Technology tech) {
     auto devices = manager()->FilterByTechnology(tech);
     return (devices.size() == 1 && devices[0].get() == device.get());
   }
@@ -438,7 +437,7 @@
   }
 #endif  // DISABLE_WIRED_8021X
 
-  const std::vector<Technology::Identifier>& GetTechnologyOrder() {
+  const std::vector<Technology>& GetTechnologyOrder() {
     return manager()->technology_order_;
   }
 
@@ -2265,12 +2264,12 @@
   ON_CALL(*mock_devices_[2], technology())
       .WillByDefault(Return(Technology::kEthernet));
 
+  EXPECT_CALL(*metrics(), NotifyDevicePresenceStatus(
+                              Technology(Technology::kEthernet), true));
   EXPECT_CALL(*metrics(),
-      NotifyDevicePresenceStatus(Technology::kEthernet, true));
-  EXPECT_CALL(*metrics(),
-      NotifyDevicePresenceStatus(Technology::kWifi, true));
-  EXPECT_CALL(*metrics(),
-      NotifyDevicePresenceStatus(Technology::kCellular, false));
+              NotifyDevicePresenceStatus(Technology(Technology::kWifi), true));
+  EXPECT_CALL(*metrics(), NotifyDevicePresenceStatus(
+                              Technology(Technology::kCellular), false));
   manager()->DevicePresenceStatusCheck();
 }
 
@@ -2585,12 +2584,9 @@
       .WillByDefault(Return(Technology::kWifi));
 
   set<string> expected_technologies;
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kEthernet));
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kWifi));
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kCellular));
+  expected_technologies.insert(Technology(Technology::kEthernet).GetName());
+  expected_technologies.insert(Technology(Technology::kWifi).GetName());
+  expected_technologies.insert(Technology(Technology::kCellular).GetName());
   Error error;
   vector<string> technologies = manager()->AvailableTechnologies(&error);
 
@@ -2632,10 +2628,8 @@
   mock_devices_[3]->SelectService(connected_service2);
 
   set<string> expected_technologies;
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kEthernet));
-  expected_technologies.insert(Technology::NameFromIdentifier(
-      Technology::kWifi));
+  expected_technologies.insert(Technology(Technology::kEthernet).GetName());
+  expected_technologies.insert(Technology(Technology::kWifi).GetName());
   Error error;
 
   vector<string> technologies = manager()->ConnectedTechnologies(&error);
@@ -2667,8 +2661,7 @@
   manager()->RegisterService(connected_service);
   CompleteServiceSort();
   // Connected service should be brought to the front now.
-  string expected_technology =
-      Technology::NameFromIdentifier(Technology::kWifi);
+  string expected_technology = Technology(Technology::kWifi).GetName();
   EXPECT_THAT(manager()->DefaultTechnology(&error), StrEq(expected_technology));
 }
 
diff --git a/shill/metrics.cc b/shill/metrics.cc
index 2d34899..2175d15 100644
--- a/shill/metrics.cc
+++ b/shill/metrics.cc
@@ -932,8 +932,8 @@
 void Metrics::NotifyDefaultServiceChanged(const Service* service) {
   base::TimeDelta elapsed_seconds;
 
-  Technology::Identifier technology = (service) ? service->technology() :
-                                                  Technology::kUnknown;
+  Technology technology =
+      service ? service->technology() : Technology(Technology::kUnknown);
   if (technology != last_default_technology_) {
     if (last_default_technology_ != Technology::kUnknown) {
       string histogram = GetFullMetricName(kMetricTimeOnlineSecondsSuffix,
@@ -987,9 +987,9 @@
 
   if (collect_bootstats_) {
     bootstat_log(base::StringPrintf("network-%s-%s",
-                                    Technology::NameFromIdentifier(
-                                        service.technology()).c_str(),
-                                    service.GetStateString().c_str()).c_str());
+                                    service.technology().GetName().c_str(),
+                                    service.GetStateString().c_str())
+                     .c_str());
   }
 
   if (new_state != Service::kStateConnected)
@@ -1002,8 +1002,8 @@
 }
 
 string Metrics::GetFullMetricName(const char* metric_suffix,
-                                  Technology::Identifier technology_id) {
-  string technology = Technology::NameFromIdentifier(technology_id);
+                                  Technology technology_id) {
+  string technology = technology_id.GetName();
   technology[0] = base::ToUpperASCII(technology[0]);
   return base::StringPrintf("%s.%s.%s", kMetricPrefix, technology.c_str(),
                             metric_suffix);
@@ -1033,7 +1033,7 @@
 }
 
 void Metrics::NotifyServiceDisconnect(const Service& service) {
-  Technology::Identifier technology = service.technology();
+  Technology technology = service.technology();
   string histogram = GetFullMetricName(kMetricDisconnectSuffix, technology);
   SendToUMA(histogram,
             service.explicitly_disconnected(),
@@ -1046,7 +1046,7 @@
                                        int16_t signal_strength) {
   // Negate signal_strength (goes from dBm to -dBm) because the metrics don't
   // seem to handle negative values well.  Now everything's positive.
-  Technology::Identifier technology = service.technology();
+  Technology technology = service.technology();
   string histogram = GetFullMetricName(kMetricSignalAtDisconnectSuffix,
                                        technology);
   SendToUMA(histogram,
@@ -1210,12 +1210,11 @@
   --num_scan_results_expected_in_dark_resume_;
 }
 
-void Metrics::NotifyLinkMonitorFailure(
-    Technology::Identifier technology,
-    LinkMonitorFailure failure,
-    int seconds_to_failure,
-    int broadcast_error_count,
-    int unicast_error_count) {
+void Metrics::NotifyLinkMonitorFailure(Technology technology,
+                                       LinkMonitorFailure failure,
+                                       int seconds_to_failure,
+                                       int broadcast_error_count,
+                                       int unicast_error_count) {
   string histogram = GetFullMetricName(kMetricLinkMonitorFailureSuffix,
                                        technology);
   SendEnumToUMA(histogram, failure, kLinkMonitorFailureMax);
@@ -1249,8 +1248,7 @@
 }
 
 void Metrics::NotifyLinkMonitorResponseTimeSampleAdded(
-    Technology::Identifier technology,
-    int response_time_milliseconds) {
+    Technology technology, int response_time_milliseconds) {
   string histogram = GetFullMetricName(
       kMetricLinkMonitorResponseTimeSampleSuffix,  technology);
   SendToUMA(histogram,
@@ -1386,8 +1384,7 @@
             kMetricWifiSupplicantAttemptsNumBuckets);
 }
 
-void Metrics::RegisterDevice(int interface_index,
-                             Technology::Identifier technology) {
+void Metrics::RegisterDevice(int interface_index, Technology technology) {
   SLOG(this, 2) << __func__ << ": " << interface_index;
   auto device_metrics = std::make_unique<DeviceMetrics>();
   device_metrics->technology = technology;
@@ -1451,8 +1448,7 @@
   devices_metrics_[interface_index] = std::move(device_metrics);
 }
 
-bool Metrics::IsDeviceRegistered(int interface_index,
-                                 Technology::Identifier technology) {
+bool Metrics::IsDeviceRegistered(int interface_index, Technology technology) {
   SLOG(this, 2) << __func__ << ": interface index: " << interface_index
                             << ", technology: " << technology;
   DeviceMetrics* device_metrics = GetDeviceMetrics(interface_index);
@@ -1769,7 +1765,7 @@
                 kUserInitiatedConnectionFailureReasonMax);
 }
 
-void Metrics::NotifyFallbackDNSTestResult(Technology::Identifier technology_id,
+void Metrics::NotifyFallbackDNSTestResult(Technology technology_id,
                                           int result) {
   string histogram = GetFullMetricName(kMetricFallbackDNSTestResultSuffix,
                                        technology_id);
@@ -1778,7 +1774,7 @@
                 kFallbackDNSTestResultMax);
 }
 
-void Metrics::NotifyNetworkProblemDetected(Technology::Identifier technology_id,
+void Metrics::NotifyNetworkProblemDetected(Technology technology_id,
                                            int reason) {
   string histogram = GetFullMetricName(kMetricNetworkProblemDetectedSuffix,
                                        technology_id);
@@ -1795,14 +1791,14 @@
   SendEnumToUMA(kMetricDhcpClientStatus, status, kDhcpClientStatusMax);
 }
 
-void Metrics::NotifyNetworkConnectionIPType(
-    Technology::Identifier technology_id, NetworkConnectionIPType type) {
+void Metrics::NotifyNetworkConnectionIPType(Technology technology_id,
+                                            NetworkConnectionIPType type) {
   string histogram = GetFullMetricName(kMetricNetworkConnectionIPTypeSuffix,
                                        technology_id);
   SendEnumToUMA(histogram, type, kNetworkConnectionIPTypeMax);
 }
 
-void Metrics::NotifyIPv6ConnectivityStatus(Technology::Identifier technology_id,
+void Metrics::NotifyIPv6ConnectivityStatus(Technology technology_id,
                                            bool status) {
   string histogram = GetFullMetricName(kMetricIPv6ConnectivityStatusSuffix,
                                        technology_id);
@@ -1811,7 +1807,7 @@
   SendEnumToUMA(histogram, ipv6_status, kIPv6ConnectivityStatusMax);
 }
 
-void Metrics::NotifyDevicePresenceStatus(Technology::Identifier technology_id,
+void Metrics::NotifyDevicePresenceStatus(Technology technology_id,
                                          bool status) {
   string histogram = GetFullMetricName(kMetricDevicePresenceStatusSuffix,
                                        technology_id);
@@ -1820,7 +1816,7 @@
   SendEnumToUMA(histogram, presence, kDevicePresenceStatusMax);
 }
 
-void Metrics::NotifyDeviceRemovedEvent(Technology::Identifier technology_id) {
+void Metrics::NotifyDeviceRemovedEvent(Technology technology_id) {
   DeviceTechnologyType type;
   switch (technology_id) {
     case Technology::kEthernet:
@@ -1839,8 +1835,8 @@
   SendEnumToUMA(kMetricDeviceRemovedEvent, type, kDeviceTechnologyTypeMax);
 }
 
-void Metrics::NotifyUnreliableLinkSignalStrength(
-    Technology::Identifier technology_id, int signal_strength) {
+void Metrics::NotifyUnreliableLinkSignalStrength(Technology technology_id,
+                                                 int signal_strength) {
   string histogram = GetFullMetricName(
       kMetricUnreliableLinkSignalStrengthSuffix, technology_id);
   SendToUMA(histogram,
@@ -2020,7 +2016,7 @@
 }
 
 void Metrics::InitializeCommonServiceMetrics(const Service& service) {
-  Technology::Identifier technology = service.technology();
+  Technology technology = service.technology();
   string histogram = GetFullMetricName(kMetricTimeToConfigMillisecondsSuffix,
                                        technology);
   AddServiceStateTransitionTimer(
@@ -2166,7 +2162,7 @@
   return it->second.get();
 }
 
-bool Metrics::IsTechnologyPresent(Technology::Identifier technology_id) const {
+bool Metrics::IsTechnologyPresent(Technology technology_id) const {
   for (const auto& metrics : devices_metrics_) {
     if (metrics.second->technology == technology_id)
       return true;
diff --git a/shill/metrics.h b/shill/metrics.h
index be6c4b5..c3dd1b0 100644
--- a/shill/metrics.h
+++ b/shill/metrics.h
@@ -987,7 +987,7 @@
 
   // Specializes |metric_suffix| for the specified |technology_id|.
   std::string GetFullMetricName(const char* metric_suffix,
-                                Technology::Identifier technology_id);
+                                Technology technology_id);
 
   std::string GetSuspendDurationMetricNameFromStatus(
         WiFiConnectionStatusAfterWake status);
@@ -1057,18 +1057,16 @@
   void NotifyDarkResumeScanResultsReceived();
 
   // Notifies this object of a failure in LinkMonitor.
-  void NotifyLinkMonitorFailure(
-      Technology::Identifier technology,
-      LinkMonitorFailure failure,
-      int seconds_to_failure,
-      int broadcast_error_count,
-      int unicast_error_count);
+  void NotifyLinkMonitorFailure(Technology technology,
+                                LinkMonitorFailure failure,
+                                int seconds_to_failure,
+                                int broadcast_error_count,
+                                int unicast_error_count);
 
   // Notifies this object that LinkMonitor has added a response time sample
   // for |connection| with a value of |response_time_milliseconds|.
-  void NotifyLinkMonitorResponseTimeSampleAdded(
-      Technology::Identifier technology,
-      int response_time_milliseconds);
+  void NotifyLinkMonitorResponseTimeSampleAdded(Technology technology,
+                                                int response_time_milliseconds);
 
   // Notifies this object that an AP was discovered and of that AP's 802.11k
   // support.
@@ -1109,12 +1107,10 @@
 
   // Registers a device with this object so the device can use the timers to
   // track state transition metrics.
-  void RegisterDevice(int interface_index,
-                      Technology::Identifier technology);
+  void RegisterDevice(int interface_index, Technology technology);
 
   // Checks to see if the device has already been registered.
-  bool IsDeviceRegistered(int interface_index,
-                          Technology::Identifier technology);
+  bool IsDeviceRegistered(int interface_index, Technology technology);
 
   // Deregisters the device from this class.  All state transition timers
   // will be removed.
@@ -1207,13 +1203,13 @@
   virtual void NotifyUserInitiatedEvent(int event);
 
   // Notifies this object about the result of the fallback DNS test.
-  virtual void NotifyFallbackDNSTestResult(Technology::Identifier technology_id,
+  virtual void NotifyFallbackDNSTestResult(Technology technology_id,
                                            int result);
 
   // Notifies this object about a network problem detected on the currently
   // connected network.
-  virtual void NotifyNetworkProblemDetected(
-      Technology::Identifier technology_id, int reason);
+  virtual void NotifyNetworkProblemDetected(Technology technology_id,
+                                            int reason);
 
   // Notifies this object about current connection status (online vs offline).
   virtual void NotifyDeviceConnectionStatus(Metrics::ConnectionStatus status);
@@ -1222,20 +1218,20 @@
   virtual void NotifyDhcpClientStatus(Metrics::DhcpClientStatus status);
 
   // Notifies this object about the IP type of the current network connection.
-  virtual void NotifyNetworkConnectionIPType(
-      Technology::Identifier technology_id, NetworkConnectionIPType type);
+  virtual void NotifyNetworkConnectionIPType(Technology technology_id,
+                                             NetworkConnectionIPType type);
 
   // Notifies this object about the IPv6 connectivity status.
-  virtual void NotifyIPv6ConnectivityStatus(
-      Technology::Identifier technology_id, bool status);
+  virtual void NotifyIPv6ConnectivityStatus(Technology technology_id,
+                                            bool status);
 
   // Notifies this object about the presence of given technology type device.
-  virtual void NotifyDevicePresenceStatus(Technology::Identifier technology_id,
+  virtual void NotifyDevicePresenceStatus(Technology technology_id,
                                           bool status);
 
   // Notifies this object about the signal strength when link is unreliable.
-  virtual void NotifyUnreliableLinkSignalStrength(
-      Technology::Identifier technology_id, int signal_strength);
+  virtual void NotifyUnreliableLinkSignalStrength(Technology technology_id,
+                                                  int signal_strength);
 
   // Sends linear histogram data to UMA.
   virtual bool SendEnumToUMA(const std::string& name, int sample, int max);
@@ -1340,7 +1336,7 @@
 
   struct DeviceMetrics {
     DeviceMetrics() : auto_connect_tries(0) {}
-    Technology::Identifier technology;
+    Technology technology;
     std::unique_ptr<chromeos_metrics::TimerReporter> initialization_timer;
     std::unique_ptr<chromeos_metrics::TimerReporter> enable_timer;
     std::unique_ptr<chromeos_metrics::TimerReporter> disable_timer;
@@ -1378,11 +1374,11 @@
 
   // Notifies this object about the removal/resetting of a device with given
   // technology type.
-  void NotifyDeviceRemovedEvent(Technology::Identifier technology_id);
+  void NotifyDeviceRemovedEvent(Technology technology_id);
 
   // Returns |true| if and only if a device that supports |technology_id| is
   // registered.
-  bool IsTechnologyPresent(Technology::Identifier technology_id) const;
+  bool IsTechnologyPresent(Technology technology_id) const;
 
   // For unit test purposes.
   void set_library(MetricsLibraryInterface* library);
@@ -1429,7 +1425,7 @@
   MetricsLibrary metrics_library_;
   MetricsLibraryInterface* library_;
   ServiceMetricsLookupMap services_metrics_;
-  Technology::Identifier last_default_technology_;
+  Technology last_default_technology_;
   bool was_last_online_;
   std::unique_ptr<chromeos_metrics::Timer> time_online_timer_;
   std::unique_ptr<chromeos_metrics::Timer> time_to_drop_timer_;
diff --git a/shill/metrics_test.cc b/shill/metrics_test.cc
index c4c1f36..c8d083e 100644
--- a/shill/metrics_test.cc
+++ b/shill/metrics_test.cc
@@ -254,7 +254,8 @@
   eap_wifi_service_->frequency_ = 2412;
   eap_wifi_service_->physical_mode_ = Metrics::kWiFiNetworkPhyMode11a;
   eap_wifi_service_->raw_signal_strength_ = kStrength;
-  EXPECT_CALL(*eap_, OutputConnectionMetrics(&metrics_, Technology::kWifi));
+  EXPECT_CALL(
+      *eap_, OutputConnectionMetrics(&metrics_, Technology(Technology::kWifi)));
   metrics_.NotifyServiceStateChanged(*eap_wifi_service_,
                                      Service::kStateConnected);
 }
diff --git a/shill/mock_connection.h b/shill/mock_connection.h
index 8b66783..cd2d7f0 100644
--- a/shill/mock_connection.h
+++ b/shill/mock_connection.h
@@ -31,7 +31,7 @@
   MOCK_CONST_METHOD0(dns_servers, const std::vector<std::string>&());
   MOCK_CONST_METHOD0(local, const IPAddress&());
   MOCK_CONST_METHOD0(gateway, const IPAddress&());
-  MOCK_CONST_METHOD0(technology, Technology::Identifier());
+  MOCK_CONST_METHOD0(technology, Technology());
   MOCK_CONST_METHOD0(tethering, std::string&());
   MOCK_METHOD1(UpdateDNSServers,
                void(const std::vector<std::string>& dns_servers));
diff --git a/shill/mock_device.cc b/shill/mock_device.cc
index d0ddf43..0c6e608 100644
--- a/shill/mock_device.cc
+++ b/shill/mock_device.cc
@@ -23,7 +23,7 @@
                        int interface_index)
     : Device(
           manager, link_name, address, interface_index, Technology::kUnknown) {
-  DefaultValue<Technology::Identifier>::Set(Technology::kUnknown);
+  DefaultValue<Technology>::Set(Technology::kUnknown);
   ON_CALL(*this, connection())
       .WillByDefault(testing::ReturnRef(Device::connection()));
 }
diff --git a/shill/mock_device.h b/shill/mock_device.h
index b2ed035..b1ebe36 100644
--- a/shill/mock_device.h
+++ b/shill/mock_device.h
@@ -49,7 +49,7 @@
   MOCK_METHOD0(GetReceiveByteCount, uint64_t());
   MOCK_METHOD0(GetTransmitByteCount, uint64_t());
   MOCK_CONST_METHOD1(IsConnectedToService, bool(const ServiceRefPtr& service));
-  MOCK_CONST_METHOD0(technology, Technology::Identifier());
+  MOCK_CONST_METHOD0(technology, Technology());
   MOCK_METHOD1(OnBeforeSuspend, void(const ResultCallback& callback));
   MOCK_METHOD1(OnDarkResume, void(const ResultCallback& callback));
   MOCK_METHOD0(OnAfterResume, void());
diff --git a/shill/mock_eap_credentials.h b/shill/mock_eap_credentials.h
index b37f449..4469a11 100644
--- a/shill/mock_eap_credentials.h
+++ b/shill/mock_eap_credentials.h
@@ -22,7 +22,7 @@
   MOCK_CONST_METHOD0(IsConnectableUsingPassphrase, bool());
   MOCK_METHOD2(Load, void(StoreInterface* store, const std::string& id));
   MOCK_CONST_METHOD2(OutputConnectionMetrics,
-                     void(Metrics* metrics, Technology::Identifier technology));
+                     void(Metrics* metrics, Technology technology));
   MOCK_CONST_METHOD2(PopulateSupplicantProperties,
                      void(CertificateFile* certificate_file,
                           KeyValueStore* params));
diff --git a/shill/mock_manager.h b/shill/mock_manager.h
index 7923989..5b6d8fa 100644
--- a/shill/mock_manager.h
+++ b/shill/mock_manager.h
@@ -68,18 +68,15 @@
                              Error* error));
   MOCK_CONST_METHOD0(IsConnected, bool());
   MOCK_METHOD0(UpdateEnabledTechnologies, void());
-  MOCK_METHOD1(IsPortalDetectionEnabled, bool(Technology::Identifier tech));
+  MOCK_METHOD1(IsPortalDetectionEnabled, bool(Technology tech));
   MOCK_CONST_METHOD1(IsServiceEphemeral,
                      bool(const ServiceConstRefPtr& service));
   MOCK_CONST_METHOD2(IsProfileBefore,
                      bool(const ProfileRefPtr& a,
                           const ProfileRefPtr& b));
-  MOCK_CONST_METHOD1(IsTechnologyConnected,
-                     bool(Technology::Identifier tech));
-  MOCK_CONST_METHOD1(IsTechnologyLinkMonitorEnabled,
-                     bool(Technology::Identifier tech));
-  MOCK_CONST_METHOD1(IsTechnologyAutoConnectDisabled,
-                     bool(Technology::Identifier tech));
+  MOCK_CONST_METHOD1(IsTechnologyConnected, bool(Technology tech));
+  MOCK_CONST_METHOD1(IsTechnologyLinkMonitorEnabled, bool(Technology tech));
+  MOCK_CONST_METHOD1(IsTechnologyAutoConnectDisabled, bool(Technology tech));
   MOCK_METHOD2(RequestScan, void(const std::string& technology, Error* error));
   MOCK_CONST_METHOD0(GetPortalCheckHttpUrl, const std::string&());
   MOCK_CONST_METHOD0(GetPortalCheckHttpsUrl, const std::string&());
@@ -87,7 +84,7 @@
                      const std::vector<std::string>&());
   MOCK_METHOD0(IsSuspending, bool());
   MOCK_CONST_METHOD1(GetEnabledDeviceWithTechnology,
-                     DeviceRefPtr(Technology::Identifier technology));
+                     DeviceRefPtr(Technology technology));
   MOCK_CONST_METHOD1(GetEnabledDeviceByLinkName,
                      DeviceRefPtr(const std::string& link_name));
   MOCK_CONST_METHOD0(GetMinimumMTU, int());
diff --git a/shill/mock_metrics.h b/shill/mock_metrics.h
index c2d040f..7b4a0e6 100644
--- a/shill/mock_metrics.h
+++ b/shill/mock_metrics.h
@@ -59,21 +59,21 @@
                void(const std::string& name,
                     const Service::ConnectFailure failure));
   MOCK_METHOD2(NotifyNetworkProblemDetected,
-               void(Technology::Identifier technology_id, int reason));
+               void(Technology technology_id, int reason));
   MOCK_METHOD2(NotifyFallbackDNSTestResult,
-               void(Technology::Identifier technology_id, int result));
+               void(Technology technology_id, int result));
   MOCK_METHOD1(NotifyDeviceConnectionStatus,
                void(Metrics::ConnectionStatus status));
   MOCK_METHOD1(NotifyDhcpClientStatus, void(Metrics::DhcpClientStatus status));
   MOCK_METHOD2(NotifyNetworkConnectionIPType,
-               void(Technology::Identifier technology_id,
+               void(Technology technology_id,
                     Metrics::NetworkConnectionIPType type));
   MOCK_METHOD2(NotifyIPv6ConnectivityStatus,
-               void(Technology::Identifier technology_id, bool status));
+               void(Technology technology_id, bool status));
   MOCK_METHOD2(NotifyDevicePresenceStatus,
-               void(Technology::Identifier technology_id, bool status));
+               void(Technology technology_id, bool status));
   MOCK_METHOD2(NotifyUnreliableLinkSignalStrength,
-               void(Technology::Identifier technology_id, int signal_strength));
+               void(Technology technology_id, int signal_strength));
   MOCK_METHOD1(NotifyVerifyWakeOnWiFiSettingsResult,
                void(VerifyWakeOnWiFiSettingsResult result));
   MOCK_METHOD1(NotifyConnectedToServiceAfterWake,
diff --git a/shill/mock_service.h b/shill/mock_service.h
index abce39b..4dfb376 100644
--- a/shill/mock_service.h
+++ b/shill/mock_service.h
@@ -66,7 +66,7 @@
 #if !defined(DISABLE_WIFI) || !defined(DISABLE_WIRED_8021X)
   MOCK_CONST_METHOD0(eap, const EapCredentials*());
 #endif  // DISABLE_WIFI || DISABLE_WIRED_8021X
-  MOCK_CONST_METHOD0(technology, Technology::Identifier());
+  MOCK_CONST_METHOD0(technology, Technology());
   MOCK_METHOD1(OnPropertyChanged, void(const std::string& property));
   MOCK_METHOD0(ClearExplicitlyDisconnected, void());
   MOCK_CONST_METHOD0(is_dns_auto_fallback_allowed, bool());
diff --git a/shill/mock_virtual_device.cc b/shill/mock_virtual_device.cc
index 2a27a63..f74e4cd 100644
--- a/shill/mock_virtual_device.cc
+++ b/shill/mock_virtual_device.cc
@@ -9,7 +9,7 @@
 MockVirtualDevice::MockVirtualDevice(Manager* manager,
                                      const std::string& link_name,
                                      int interface_index,
-                                     Technology::Identifier technology)
+                                     Technology technology)
     : VirtualDevice(manager, link_name, interface_index, technology) {}
 
 MockVirtualDevice::~MockVirtualDevice() = default;
diff --git a/shill/mock_virtual_device.h b/shill/mock_virtual_device.h
index 7881703..aa61a6a 100644
--- a/shill/mock_virtual_device.h
+++ b/shill/mock_virtual_device.h
@@ -18,7 +18,7 @@
   MockVirtualDevice(Manager* manager,
                     const std::string& link_name,
                     int interface_index,
-                    Technology::Identifier technology);
+                    Technology technology);
   ~MockVirtualDevice() override;
 
   MOCK_METHOD2(Stop,
diff --git a/shill/profile.cc b/shill/profile.cc
index 41aa278..dbee6f1 100644
--- a/shill/profile.cc
+++ b/shill/profile.cc
@@ -368,7 +368,7 @@
   // Filter this list down to only entries that correspond
   // to a technology.  (wifi_*, etc)
   for (const auto& group : storage_->GetGroups()) {
-    if (Technology::IdentifierFromStorageGroup(group) != Technology::kUnknown)
+    if (Technology::CreateFromStorageGroup(group) != Technology::kUnknown)
       service_groups.push_back(group);
   }
 
diff --git a/shill/profile_test.cc b/shill/profile_test.cc
index d7842ca..737f3ef 100644
--- a/shill/profile_test.cc
+++ b/shill/profile_test.cc
@@ -271,10 +271,10 @@
 TEST_F(ProfileTest, EntryEnumeration) {
   scoped_refptr<MockService> service1 = CreateMockService();
   scoped_refptr<MockService> service2 = CreateMockService();
-  string service1_storage_name = Technology::NameFromIdentifier(
-      Technology::kCellular) + "_1";
-  string service2_storage_name = Technology::NameFromIdentifier(
-      Technology::kCellular) + "_2";
+  string service1_storage_name =
+      Technology(Technology::kCellular).GetName() + "_1";
+  string service2_storage_name =
+      Technology(Technology::kCellular).GetName() + "_2";
   EXPECT_CALL(*service1, Save(_))
       .WillRepeatedly(Invoke(service1.get(), &MockService::FauxSave));
   EXPECT_CALL(*service2, Save(_))
diff --git a/shill/property_store_test.h b/shill/property_store_test.h
index 4063758..7f49bd0 100644
--- a/shill/property_store_test.h
+++ b/shill/property_store_test.h
@@ -184,7 +184,7 @@
   MockControl* control_interface() { return &control_interface_; }
   EventDispatcher* dispatcher() { return &dispatcher_; }
   MockMetrics* metrics() { return &metrics_; }
-  const std::vector<Technology::Identifier>& default_technology_order() const {
+  const std::vector<Technology>& default_technology_order() const {
     return default_technology_order_;
   }
 
@@ -205,7 +205,7 @@
   MockControl control_interface_;
   EventDispatcherForTest dispatcher_;
   testing::NiceMock<MockMetrics> metrics_;
-  const std::vector<Technology::Identifier> default_technology_order_;
+  const std::vector<Technology> default_technology_order_;
   Manager manager_;
 };
 
diff --git a/shill/service.cc b/shill/service.cc
index a3c20c6..3bf46a9 100644
--- a/shill/service.cc
+++ b/shill/service.cc
@@ -117,7 +117,7 @@
 // static
 unsigned int Service::next_serial_number_ = 0;
 
-Service::Service(Manager* manager, Technology::Identifier technology)
+Service::Service(Manager* manager, Technology technology)
     : weak_ptr_factory_(this),
       state_(kStateIdle),
       previous_state_(kStateIdle),
@@ -259,8 +259,7 @@
 
   dhcp_properties_->InitPropertyStore(&store_);
 
-  SLOG(this, 1) << Technology::NameFromIdentifier(technology) << " service "
-                << unique_name_ << " constructed.";
+  SLOG(this, 1) << technology << " service " << unique_name_ << " constructed.";
 }
 
 Service::~Service() {
@@ -947,7 +946,7 @@
 }
 
 string Service::GetTechnologyString() const {
-  return Technology::NameFromIdentifier(technology());
+  return technology().GetName();
 }
 
 void Service::NoteDisconnectEvent() {
@@ -1045,7 +1044,7 @@
                       ServiceRefPtr a,
                       ServiceRefPtr b,
                       bool compare_connectivity_state,
-                      const vector<Technology::Identifier>& tech_order,
+                      const vector<Technology>& tech_order,
                       const char** reason) {
   bool ret;
 
@@ -1299,7 +1298,7 @@
     return false;
   }
 
-  if (!Technology::IsPrimaryConnectivityTechnology(technology_) &&
+  if (!technology_.IsPrimaryConnectivityTechnology() &&
       !manager_->IsConnected()) {
     *reason = kAutoConnOffline;
     return false;
diff --git a/shill/service.h b/shill/service.h
index f6c5073..880d3ab 100644
--- a/shill/service.h
+++ b/shill/service.h
@@ -149,7 +149,7 @@
   static const int kPriorityNone;
 
   // A constructor for the Service object
-  Service(Manager* manager, Technology::Identifier technology);
+  Service(Manager* manager, Technology technology);
 
   // AutoConnect MAY choose to ignore the connection request in some
   // cases. For example, if the corresponding Device only supports one
@@ -403,7 +403,7 @@
   // it prints as a number.
   uint16_t strength() const { return strength_; }
 
-  virtual Technology::Identifier technology() const { return technology_; }
+  virtual Technology technology() const { return technology_; }
   std::string GetTechnologyString() const;
 
 #if !defined(DISABLE_WIFI) || !defined(DISABLE_WIRED_8021X)
@@ -434,7 +434,7 @@
                       ServiceRefPtr a,
                       ServiceRefPtr b,
                       bool compare_connectivity_state,
-                      const std::vector<Technology::Identifier>& tech_order,
+                      const std::vector<Technology>& tech_order,
                       const char** reason);
 
   // Returns a sanitized version of |identifier| for use as a service storage
@@ -828,7 +828,7 @@
   std::unique_ptr<EapCredentials> eap_;
 #endif  // DISABLE_WIFI || DISABLE_WIRED_8021X
   std::unique_ptr<DhcpProperties> dhcp_properties_;
-  Technology::Identifier technology_;
+  Technology technology_;
   // The time of the most recent failure. Value is 0 if the service is
   // not currently failed.
   time_t failed_time_;
diff --git a/shill/service_sorter.h b/shill/service_sorter.h
index 6371de3..5f39940 100644
--- a/shill/service_sorter.h
+++ b/shill/service_sorter.h
@@ -22,7 +22,7 @@
  public:
   ServiceSorter(Manager* manager,
                 bool compare_connectivity_state,
-                const std::vector<Technology::Identifier>& tech_order)
+                const std::vector<Technology>& tech_order)
       : manager_(manager),
         compare_connectivity_state_(compare_connectivity_state),
         technology_order_(tech_order) {}
@@ -35,7 +35,7 @@
  private:
   Manager* manager_;
   const bool compare_connectivity_state_;
-  const std::vector<Technology::Identifier>& technology_order_;
+  const std::vector<Technology>& technology_order_;
   // We can't DISALLOW_COPY_AND_ASSIGN since this is passed by value to STL
   // sort.
 };
diff --git a/shill/service_test.cc b/shill/service_test.cc
index a170e6f..4a63eae 100644
--- a/shill/service_test.cc
+++ b/shill/service_test.cc
@@ -204,7 +204,7 @@
   MockEapCredentials* eap_;  // Owned by |service_|.
 #endif  // DISABLE_WIFI || DISABLE_WIRED_8021X
   MockPowerManager* power_manager_;  // Owned by |mock_manager_|.
-  vector<Technology::Identifier> technology_order_for_sorting_;
+  vector<Technology> technology_order_for_sorting_;
 };
 
 class AllMockServiceTest : public testing::Test {
diff --git a/shill/shill_main.cc b/shill/shill_main.cc
index 55d3c1f..1f0b10f 100644
--- a/shill/shill_main.cc
+++ b/shill/shill_main.cc
@@ -168,11 +168,11 @@
     shill::Error error;
     string order_flag = cl->GetSwitchValueASCII(
         switches::kTechnologyOrder);
-    vector<shill::Technology::Identifier> test_order_vector;
-    if (shill::Technology::GetTechnologyVectorFromString(
-        order_flag, &test_order_vector, &error)) {
+    vector<shill::Technology> test_order_vector;
+    if (shill::GetTechnologyVectorFromString(order_flag, &test_order_vector,
+                                             &error)) {
       settings.default_technology_order = order_flag;
-    }  else {
+    } else {
       LOG(ERROR) << "Invalid default technology order: [" << order_flag
                  << "] Error: " << error.message();
     }
diff --git a/shill/technology.cc b/shill/technology.cc
index 2066031..e3980e2 100644
--- a/shill/technology.cc
+++ b/shill/technology.cc
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium OS Authors. All rights reserved.
+// Copyright 2019 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -31,7 +31,47 @@
 }  // namespace
 
 // static
-Technology::Identifier Technology::IdentifierFromName(const string& name) {
+bool GetTechnologyVectorFromString(const string& technologies_string,
+                                   vector<Technology>* technologies_vector,
+                                   Error* error) {
+  CHECK(technologies_vector);
+  CHECK(error);
+
+  technologies_vector->clear();
+
+  // Check if |technologies_string| is empty as some versions of
+  // base::SplitString return a vector with one empty string when given an
+  // empty string.
+  if (technologies_string.empty()) {
+    return true;
+  }
+
+  set<Technology> seen;
+  vector<string> technology_parts = base::SplitString(
+      technologies_string, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+  for (const auto& name : technology_parts) {
+    Technology technology = Technology::CreateFromName(name);
+
+    if (technology == Technology::kUnknown) {
+      Error::PopulateAndLog(FROM_HERE, error, Error::kInvalidArguments,
+                            name + " is an unknown technology name");
+      return false;
+    }
+
+    if (base::ContainsKey(seen, technology)) {
+      Error::PopulateAndLog(FROM_HERE, error, Error::kInvalidArguments,
+                            name + " is duplicated in the list");
+      return false;
+    }
+    seen.insert(technology);
+    technologies_vector->push_back(technology);
+  }
+
+  return true;
+}
+
+// static
+Technology Technology::CreateFromName(const string& name) {
   if (name == kTypeEthernet) {
     return kEthernet;
   } else if (name == kTypeEthernetEap) {
@@ -56,88 +96,47 @@
 }
 
 // static
-string Technology::NameFromIdentifier(Technology::Identifier id) {
-  if (id == kEthernet) {
+Technology Technology::CreateFromStorageGroup(const string& group) {
+  vector<string> group_parts = base::SplitString(
+      group, "_", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+  if (group_parts.empty()) {
+    return kUnknown;
+  }
+  return CreateFromName(group_parts[0]);
+}
+
+string Technology::GetName() const {
+  if (type_ == kEthernet) {
     return kTypeEthernet;
-  } else if (id == kEthernetEap) {
+  } else if (type_ == kEthernetEap) {
     return kTypeEthernetEap;
-  } else if (id == kWifi) {
+  } else if (type_ == kWifi) {
     return kTypeWifi;
-  } else if (id == kCellular) {
+  } else if (type_ == kCellular) {
     return kTypeCellular;
-  } else if (id == kVPN) {
+  } else if (type_ == kVPN) {
     return kTypeVPN;
-  } else if (id == kLoopback) {
+  } else if (type_ == kLoopback) {
     return kLoopbackName;
-  } else if (id == kTunnel) {
+  } else if (type_ == kTunnel) {
     return kTunnelName;
-  } else if (id == kPPP) {
+  } else if (type_ == kPPP) {
     return kPPPName;
-  } else if (id == kPPPoE) {
+  } else if (type_ == kPPPoE) {
     return kTypePPPoE;
   } else {
     return kUnknownName;
   }
 }
 
-// static
-Technology::Identifier Technology::IdentifierFromStorageGroup(
-    const string& group) {
-  vector<string> group_parts = base::SplitString(
-      group, "_", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
-  if (group_parts.empty()) {
-    return kUnknown;
-  }
-  return IdentifierFromName(group_parts[0]);
+bool Technology::IsPrimaryConnectivityTechnology() const {
+  return (type_ == kCellular || type_ == kEthernet || type_ == kWifi ||
+          type_ == kPPPoE);
 }
 
-// static
-bool Technology::GetTechnologyVectorFromString(
-    const string& technologies_string,
-    vector<Identifier>* technologies_vector,
-    Error* error) {
-  CHECK(technologies_vector);
-  CHECK(error);
-
-  vector<string> technology_parts;
-  set<Technology::Identifier> seen;
-  technologies_vector->clear();
-
-  // Check if |technologies_string| is empty as some versions of
-  // base::SplitString return a vector with one empty string when given an
-  // empty string.
-  if (!technologies_string.empty()) {
-    technology_parts = base::SplitString(
-        technologies_string, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
-  }
-
-  for (const auto& name : technology_parts) {
-    Technology::Identifier identifier = Technology::IdentifierFromName(name);
-
-    if (identifier == Technology::kUnknown) {
-      Error::PopulateAndLog(FROM_HERE, error, Error::kInvalidArguments,
-                            name + " is an unknown technology name");
-      return false;
-    }
-
-    if (base::ContainsKey(seen, identifier)) {
-      Error::PopulateAndLog(FROM_HERE, error, Error::kInvalidArguments,
-                            name + " is duplicated in the list");
-      return false;
-    }
-    seen.insert(identifier);
-    technologies_vector->push_back(identifier);
-  }
-
-  return true;
-}
-
-// static
-bool Technology::IsPrimaryConnectivityTechnology(Identifier technology) {
-  return (technology == kCellular ||
-          technology == kEthernet ||
-          technology == kWifi ||
-          technology == kPPPoE);
+std::ostream& operator<<(std::ostream& os, const Technology& technology) {
+  os << technology.GetName();
+  return os;
 }
 
 }  // namespace shill
diff --git a/shill/technology.h b/shill/technology.h
index 8d40f82..7e095ed 100644
--- a/shill/technology.h
+++ b/shill/technology.h
@@ -1,22 +1,31 @@
-// Copyright 2018 The Chromium OS Authors. All rights reserved.
+// Copyright 2019 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #ifndef SHILL_TECHNOLOGY_H_
 #define SHILL_TECHNOLOGY_H_
 
+#include <iostream>
 #include <string>
 #include <vector>
 
 namespace shill {
 
 class Error;
+class Technology;
 
-// A class that provides functions for converting between technology names
-// and identifiers.
+// Convert a comma-separated list of technology names (with no whitespace
+// around commas) into a vector of Technology instances output in
+// |technologies_vector|. Returns true if the |technologies_string| contains a
+// valid set of technologies with no duplicate elements, false otherwise.
+bool GetTechnologyVectorFromString(const std::string& technologies_string,
+                                   std::vector<Technology>* technologies_vector,
+                                   Error* error);
+
+// A class representing a particular network technology type.
 class Technology {
  public:
-  enum Identifier {
+  enum Type {
     kEthernet,
     kEthernetEap,
     kWifi,
@@ -38,36 +47,37 @@
     kUnknown,
   };
 
-  // Returns the technology identifier for a technology name in |name|,
-  // or Technology::kUnknown if the technology name is unknown.
-  static Identifier IdentifierFromName(const std::string& name);
+  // Return a Technology instance given the technology name, or
+  // Technology::kUnknown if the technology name is unknown.
+  static Technology CreateFromName(const std::string& name);
 
-  // Returns the technology name for a technology identifier in |id|,
-  // or Technology::kUnknownName ("Unknown") if the technology identifier
-  // is unknown.
-  static std::string NameFromIdentifier(Identifier id);
+  // Return a Technology instance for a storage group identifier in |group|
+  // |group|, which should have the format of <technology name>_<suffix>, or
+  // Technology::kUnknown if |group| is not prefixed with a known technology
+  // name.
+  static Technology CreateFromStorageGroup(const std::string& group);
 
-  // Returns the technology identifier for a storage group identifier in
-  // |group|, which should have the format of <technology name>_<suffix>,
-  // or Technology::kUnknown if |group| is not prefixed with a known
-  // technology name.
-  static Identifier IdentifierFromStorageGroup(const std::string& group);
+  Technology() : Technology(kUnknown) {}
+  // Not explicit so that Types can be passed to methods taking Technologies.
+  Technology(Type type) : type_(type) {}
 
-  // Converts the comma-separated list of technology names (with no whitespace
-  // around commas) in |technologies_string| into a vector of technology
-  // identifiers output in |technologies_vector|. Returns true if the
-  // |technologies_string| contains a valid set of technologies with no
-  // duplicate elements, false otherwise.
-  static bool GetTechnologyVectorFromString(
-      const std::string& technologies_string,
-      std::vector<Identifier>* technologies_vector,
-      Error* error);
+  // Allow for Technology to be used as a Type (useful for
+  // comparisons/switch-cases involving Types).
+  operator Type() const { return type_; }
 
-  // Returns true if |technology| is a primary connectivity technology, i.e.
+  std::string GetName() const;
+
+  // Return true if |technology| is a primary connectivity technology, i.e.
   // Ethernet, Cellular, WiFi, or PPPoE.
-  static bool IsPrimaryConnectivityTechnology(Identifier technology);
+  bool IsPrimaryConnectivityTechnology() const;
+
+ private:
+  Type type_;
 };
 
+// Add the Technology name to the ostream.
+std::ostream& operator<<(std::ostream& os, const Technology& technology);
+
 }  // namespace shill
 
 #endif  // SHILL_TECHNOLOGY_H_
diff --git a/shill/technology_test.cc b/shill/technology_test.cc
index f6dfb4d..225bcfb 100644
--- a/shill/technology_test.cc
+++ b/shill/technology_test.cc
@@ -13,69 +13,64 @@
 
 namespace shill {
 
-TEST(TechnologyTest, IdentifierFromName) {
-  EXPECT_EQ(Technology::kEthernet, Technology::IdentifierFromName("ethernet"));
+TEST(TechnologyTest, CreateFromName) {
+  EXPECT_EQ(Technology::kEthernet, Technology::CreateFromName("ethernet"));
   EXPECT_EQ(Technology::kEthernetEap,
-            Technology::IdentifierFromName("etherneteap"));
-  EXPECT_EQ(Technology::kWifi, Technology::IdentifierFromName("wifi"));
-  EXPECT_EQ(Technology::kCellular, Technology::IdentifierFromName("cellular"));
-  EXPECT_EQ(Technology::kTunnel, Technology::IdentifierFromName("tunnel"));
-  EXPECT_EQ(Technology::kLoopback, Technology::IdentifierFromName("loopback"));
-  EXPECT_EQ(Technology::kVPN, Technology::IdentifierFromName("vpn"));
-  EXPECT_EQ(Technology::kPPP, Technology::IdentifierFromName("ppp"));
-  EXPECT_EQ(Technology::kUnknown, Technology::IdentifierFromName("bluetooth"));
-  EXPECT_EQ(Technology::kUnknown, Technology::IdentifierFromName("foo"));
-  EXPECT_EQ(Technology::kUnknown, Technology::IdentifierFromName(""));
+            Technology::CreateFromName("etherneteap"));
+  EXPECT_EQ(Technology::kWifi, Technology::CreateFromName("wifi"));
+  EXPECT_EQ(Technology::kCellular, Technology::CreateFromName("cellular"));
+  EXPECT_EQ(Technology::kTunnel, Technology::CreateFromName("tunnel"));
+  EXPECT_EQ(Technology::kLoopback, Technology::CreateFromName("loopback"));
+  EXPECT_EQ(Technology::kVPN, Technology::CreateFromName("vpn"));
+  EXPECT_EQ(Technology::kPPP, Technology::CreateFromName("ppp"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromName("bluetooth"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromName("foo"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromName(""));
 }
 
-TEST(TechnologyTest, NameFromIdentifier) {
-  EXPECT_EQ("ethernet", Technology::NameFromIdentifier(Technology::kEthernet));
-  EXPECT_EQ("etherneteap",
-            Technology::NameFromIdentifier(Technology::kEthernetEap));
-  EXPECT_EQ("wifi", Technology::NameFromIdentifier(Technology::kWifi));
-  EXPECT_EQ("cellular", Technology::NameFromIdentifier(Technology::kCellular));
-  EXPECT_EQ("tunnel", Technology::NameFromIdentifier(Technology::kTunnel));
-  EXPECT_EQ("loopback", Technology::NameFromIdentifier(Technology::kLoopback));
-  EXPECT_EQ("vpn", Technology::NameFromIdentifier(Technology::kVPN));
-  EXPECT_EQ("ppp", Technology::NameFromIdentifier(Technology::kPPP));
-  EXPECT_EQ("pppoe", Technology::NameFromIdentifier(Technology::kPPPoE));
-  EXPECT_EQ("unknown", Technology::NameFromIdentifier(Technology::kUnknown));
+TEST(TechnologyTest, GetName) {
+  EXPECT_EQ("ethernet", Technology(Technology::kEthernet).GetName());
+  EXPECT_EQ("etherneteap", Technology(Technology::kEthernetEap).GetName());
+  EXPECT_EQ("wifi", Technology(Technology::kWifi).GetName());
+  EXPECT_EQ("cellular", Technology(Technology::kCellular).GetName());
+  EXPECT_EQ("tunnel", Technology(Technology::kTunnel).GetName());
+  EXPECT_EQ("loopback", Technology(Technology::kLoopback).GetName());
+  EXPECT_EQ("vpn", Technology(Technology::kVPN).GetName());
+  EXPECT_EQ("ppp", Technology(Technology::kPPP).GetName());
+  EXPECT_EQ("pppoe", Technology(Technology::kPPPoE).GetName());
+  EXPECT_EQ("unknown", Technology(Technology::kUnknown).GetName());
 }
 
-TEST(TechnologyTest, IdentifierFromStorageGroup) {
-  EXPECT_EQ(Technology::kVPN, Technology::IdentifierFromStorageGroup("vpn"));
-  EXPECT_EQ(Technology::kVPN, Technology::IdentifierFromStorageGroup("vpn_a"));
-  EXPECT_EQ(Technology::kVPN, Technology::IdentifierFromStorageGroup("vpn__a"));
-  EXPECT_EQ(Technology::kVPN,
-            Technology::IdentifierFromStorageGroup("vpn_a_1"));
-  EXPECT_EQ(Technology::kUnknown,
-            Technology::IdentifierFromStorageGroup("_vpn"));
-  EXPECT_EQ(Technology::kUnknown, Technology::IdentifierFromStorageGroup("_"));
-  EXPECT_EQ(Technology::kUnknown, Technology::IdentifierFromStorageGroup(""));
+TEST(TechnologyTest, CreateFromStorageGroup) {
+  EXPECT_EQ(Technology::kVPN, Technology::CreateFromStorageGroup("vpn"));
+  EXPECT_EQ(Technology::kVPN, Technology::CreateFromStorageGroup("vpn_a"));
+  EXPECT_EQ(Technology::kVPN, Technology::CreateFromStorageGroup("vpn__a"));
+  EXPECT_EQ(Technology::kVPN, Technology::CreateFromStorageGroup("vpn_a_1"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromStorageGroup("_vpn"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromStorageGroup("_"));
+  EXPECT_EQ(Technology::kUnknown, Technology::CreateFromStorageGroup(""));
 }
 
 TEST(TechnologyTest, GetTechnologyVectorFromStringWithValidTechnologyNames) {
-  std::vector<Technology::Identifier> technologies;
+  std::vector<Technology> technologies;
   Error error;
 
-  EXPECT_TRUE(Technology::GetTechnologyVectorFromString(
-      "", &technologies, &error));
+  EXPECT_TRUE(GetTechnologyVectorFromString("", &technologies, &error));
   EXPECT_THAT(technologies, ElementsAre());
   EXPECT_TRUE(error.IsSuccess());
 
-  EXPECT_TRUE(Technology::GetTechnologyVectorFromString(
-      "ethernet", &technologies, &error));
+  EXPECT_TRUE(GetTechnologyVectorFromString("ethernet", &technologies, &error));
   EXPECT_THAT(technologies, ElementsAre(Technology::kEthernet));
   EXPECT_TRUE(error.IsSuccess());
 
-  EXPECT_TRUE(Technology::GetTechnologyVectorFromString(
-      "ethernet,vpn", &technologies, &error));
+  EXPECT_TRUE(
+      GetTechnologyVectorFromString("ethernet,vpn", &technologies, &error));
   EXPECT_THAT(technologies, ElementsAre(Technology::kEthernet,
                                         Technology::kVPN));
   EXPECT_TRUE(error.IsSuccess());
 
-  EXPECT_TRUE(Technology::GetTechnologyVectorFromString(
-      "wifi,ethernet,vpn", &technologies, &error));
+  EXPECT_TRUE(GetTechnologyVectorFromString("wifi,ethernet,vpn", &technologies,
+                                            &error));
   EXPECT_THAT(technologies, ElementsAre(Technology::kWifi,
                                         Technology::kEthernet,
                                         Technology::kVPN));
@@ -83,32 +78,31 @@
 }
 
 TEST(TechnologyTest, GetTechnologyVectorFromStringWithInvalidTechnologyNames) {
-  std::vector<Technology::Identifier> technologies;
+  std::vector<Technology> technologies;
   Error error;
 
-  EXPECT_FALSE(Technology::GetTechnologyVectorFromString(
-      "foo", &technologies, &error));
+  EXPECT_FALSE(GetTechnologyVectorFromString("foo", &technologies, &error));
   EXPECT_EQ(Error::kInvalidArguments, error.type());
   EXPECT_EQ("foo is an unknown technology name", error.message());
 
-  EXPECT_FALSE(Technology::GetTechnologyVectorFromString(
-      "ethernet,bar", &technologies, &error));
+  EXPECT_FALSE(
+      GetTechnologyVectorFromString("ethernet,bar", &technologies, &error));
   EXPECT_EQ(Error::kInvalidArguments, error.type());
   EXPECT_EQ("bar is an unknown technology name", error.message());
 
-  EXPECT_FALSE(Technology::GetTechnologyVectorFromString(
-      "ethernet,foo,vpn", &technologies, &error));
+  EXPECT_FALSE(
+      GetTechnologyVectorFromString("ethernet,foo,vpn", &technologies, &error));
   EXPECT_EQ(Error::kInvalidArguments, error.type());
   EXPECT_EQ("foo is an unknown technology name", error.message());
 }
 
 TEST(TechnologyTest,
      GetTechnologyVectorFromStringWithDuplicateTechnologyNames) {
-  std::vector<Technology::Identifier> technologies;
+  std::vector<Technology> technologies;
   Error error;
 
-  EXPECT_FALSE(Technology::GetTechnologyVectorFromString(
-      "ethernet,vpn,ethernet", &technologies, &error));
+  EXPECT_FALSE(GetTechnologyVectorFromString("ethernet,vpn,ethernet",
+                                             &technologies, &error));
   EXPECT_EQ(Error::kInvalidArguments, error.type());
   EXPECT_EQ("ethernet is duplicated in the list", error.message());
 }
diff --git a/shill/virtual_device.cc b/shill/virtual_device.cc
index 52ad02f..5b5ea2c 100644
--- a/shill/virtual_device.cc
+++ b/shill/virtual_device.cc
@@ -24,7 +24,7 @@
 VirtualDevice::VirtualDevice(Manager* manager,
                              const std::string& link_name,
                              int interface_index,
-                             Technology::Identifier technology)
+                             Technology technology)
     : Device(manager,
              link_name,
              kHardwareAddressEmpty,
diff --git a/shill/virtual_device.h b/shill/virtual_device.h
index 014abbf..4701f3e 100644
--- a/shill/virtual_device.h
+++ b/shill/virtual_device.h
@@ -25,7 +25,7 @@
   VirtualDevice(Manager* manager,
                 const std::string& link_name,
                 int interface_index,
-                Technology::Identifier technology);
+                Technology technology);
   ~VirtualDevice() override;
 
   bool Load(StoreInterface* storage) override;
diff --git a/shill/vpn/mock_vpn_provider.h b/shill/vpn/mock_vpn_provider.h
index faffb2a..bfe1e83 100644
--- a/shill/vpn/mock_vpn_provider.h
+++ b/shill/vpn/mock_vpn_provider.h
@@ -24,7 +24,7 @@
   MOCK_METHOD3(OnDeviceInfoAvailable,
                bool(const std::string& link_name,
                     int interface_index,
-                    Technology::Identifier technology));
+                    Technology technology));
   MOCK_CONST_METHOD0(HasActiveService, bool());
 
  private:
diff --git a/shill/vpn/vpn_provider.cc b/shill/vpn/vpn_provider.cc
index 09d6665..86e2331 100644
--- a/shill/vpn/vpn_provider.cc
+++ b/shill/vpn/vpn_provider.cc
@@ -179,7 +179,7 @@
 
 bool VPNProvider::OnDeviceInfoAvailable(const string& link_name,
                                         int interface_index,
-                                        Technology::Identifier technology) {
+                                        Technology technology) {
   if (technology == Technology::kArc) {
     arc_device_ = new VirtualDevice(manager_, link_name, interface_index,
                                     Technology::kArc);
diff --git a/shill/vpn/vpn_provider.h b/shill/vpn/vpn_provider.h
index e89abba..e5ca51d 100644
--- a/shill/vpn/vpn_provider.h
+++ b/shill/vpn/vpn_provider.h
@@ -49,7 +49,7 @@
   // device has been accepted by a service.
   virtual bool OnDeviceInfoAvailable(const std::string& link_name,
                                      int interface_index,
-                                     Technology::Identifier technology);
+                                     Technology technology);
 
   // Clean up a VPN services that has been unloaded and will be deregistered.
   // This removes the VPN provider's reference to this service in its
diff --git a/shill/vpn/vpn_service.cc b/shill/vpn/vpn_service.cc
index 1c43da1..e55c770 100644
--- a/shill/vpn/vpn_service.cc
+++ b/shill/vpn/vpn_service.cc
@@ -109,7 +109,7 @@
     return "";
   }
 
-  return Technology::NameFromIdentifier(underlying_connection->technology());
+  return underlying_connection->technology().GetName();
 }
 
 RpcIdentifier VPNService::GetDeviceRpcId(Error* error) const {
diff --git a/shill/wifi/wifi_provider_test.cc b/shill/wifi/wifi_provider_test.cc
index ef1a6e8..889b43e 100644
--- a/shill/wifi/wifi_provider_test.cc
+++ b/shill/wifi/wifi_provider_test.cc
@@ -651,7 +651,7 @@
   EXPECT_CALL(manager_, RegisterService(_))
       .WillOnce(Invoke(this, &WiFiProviderTest::BindServiceToDefaultProfile));
   EXPECT_CALL(manager_, IsServiceEphemeral(_)).WillRepeatedly(Return(false));
-  EXPECT_CALL(manager_, IsTechnologyConnected(Technology::kWifi))
+  EXPECT_CALL(manager_, IsTechnologyConnected(Technology(Technology::kWifi)))
       .WillOnce(Return(true));
   EXPECT_CALL(manager_, RequestScan(_, _)).Times(0);
   EXPECT_CALL(metrics_, SendToUMA(
@@ -680,7 +680,7 @@
   EXPECT_CALL(manager_, RegisterService(_))
       .WillOnce(Invoke(this, &WiFiProviderTest::BindServiceToDefaultProfile));
   EXPECT_CALL(manager_, IsServiceEphemeral(_)).WillRepeatedly(Return(false));
-  EXPECT_CALL(manager_, IsTechnologyConnected(Technology::kWifi))
+  EXPECT_CALL(manager_, IsTechnologyConnected(Technology(Technology::kWifi)))
       .WillOnce(Return(false));
   EXPECT_CALL(manager_, RequestScan(kTypeWifi, _)).Times(1);
   EXPECT_CALL(metrics_, SendToUMA(
@@ -794,7 +794,7 @@
       .WillRepeatedly(
           Invoke(this, &WiFiProviderTest::BindServiceToDefaultProfile));
   EXPECT_CALL(manager_, IsServiceEphemeral(_)).WillRepeatedly(Return(false));
-  EXPECT_CALL(manager_, IsTechnologyConnected(Technology::kWifi))
+  EXPECT_CALL(manager_, IsTechnologyConnected(Technology(Technology::kWifi)))
       .WillOnce(Return(true));
   EXPECT_CALL(manager_, RequestScan(kTypeWifi, _)).Times(0);
   EXPECT_CALL(metrics_, SendToUMA(
diff --git a/shill/wifi/wifi_service_test.cc b/shill/wifi/wifi_service_test.cc
index 8e29186..1a959d1 100644
--- a/shill/wifi/wifi_service_test.cc
+++ b/shill/wifi/wifi_service_test.cc
@@ -2167,7 +2167,7 @@
   // No preferred device.
   EXPECT_CALL(*mock_manager(), GetEnabledDeviceByLinkName(_)).Times(0);
   EXPECT_CALL(*mock_manager(),
-              GetEnabledDeviceWithTechnology(Technology::kWifi))
+              GetEnabledDeviceWithTechnology(Technology(Technology::kWifi)))
       .WillOnce(Return(wifi1));
   EXPECT_EQ(wifi1, service->ChooseDevice());
   Mock::VerifyAndClearExpectations(mock_manager());