Index: chromeos/network/network_util.cc |
diff --git a/chromeos/network/network_util.cc b/chromeos/network/network_util.cc |
index 35980b22c6c50736bd0e36d04e97f0f408c6f1f7..ac102ecaa0e92917baaf0383a2894932204e0eac 100644 |
--- a/chromeos/network/network_util.cc |
+++ b/chromeos/network/network_util.cc |
@@ -99,6 +99,18 @@ int32 NetmaskToPrefixLength(const std::string& netmask) { |
return prefix_length; |
} |
+std::string FormattedMacAddress(const std::string& shill_mac_address) { |
+ if (shill_mac_address.size() % 2 != 0) |
+ return shill_mac_address; |
+ std::string result; |
+ for (size_t i = 0; i < shill_mac_address.size(); ++i) { |
+ if ((i != 0) && (i % 2 == 0)) |
+ result.push_back(':'); |
+ result.push_back(shill_mac_address[i]); |
+ } |
+ return result; |
+} |
+ |
bool ParseCellularScanResults(const base::ListValue& list, |
std::vector<CellularScanResult>* scan_results) { |
scan_results->clear(); |