Commit 8f921d35 authored by stevenjb@chromium.org's avatar stevenjb@chromium.org

Get device by type for Hardware Address

BUG=303930
R=armansito@chromium.org

Review URL: https://codereview.chromium.org/61183002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233287 0039d316-1c4b-4281-b951-d872f2087c98
parent 42b315e2
......@@ -247,10 +247,12 @@ const NetworkState* NetworkStateHandler::FirstNetworkByType(
std::string NetworkStateHandler::HardwareAddressForType(
const NetworkTypePattern& type) const {
const DeviceState* device = NULL;
const NetworkState* network = ConnectedNetworkByType(type);
if (!network)
return std::string();
const DeviceState* device = GetDeviceState(network->device_path());
if (network)
device = GetDeviceState(network->device_path());
else
device = GetDeviceStateByType(type);
if (!device)
return std::string();
std::string result = device->mac_address();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment