namespace ash {
class NetworkDeviceHandler;
}

namespace policy {

// This class observes the device setting |DeviceDockMacAddressSource|, and
// updates shill EthernetMacAddressSource property based on this setting.
class DeviceDockMacAddressHandler {
 public:
  DeviceDockMacAddressHandler(
      ash::CrosSettings* cros_settings,
      ash::NetworkDeviceHandler* network_device_handler);

  DeviceDockMacAddressHandler(const DeviceDockMacAddressHandler&) = delete;
  DeviceDockMacAddressHandler& operator=(const DeviceDockMacAddressHandler&) =
      delete;

  ~DeviceDockMacAddressHandler();

 private:
  void OnDockMacAddressSourcePolicyChanged();

  ash::CrosSettings* cros_settings_;
  ash::NetworkDeviceHandler* network_device_handler_;
  base::CallbackListSubscription dock_mac_address_source_policy_subscription_;
  base::WeakPtrFactory<DeviceDockMacAddressHandler> weak_factory_{this};
};

}  // namespace policy

#endif  // CHROME_BROWSER_ASH_POLICY_HANDLERS_DEVICE_DOCK_MAC_ADDRESS_SOURCE_HANDLER_H_
