| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| 7 | 7 |
| 8 // This header is introduced to make it easy to switch from chromeos_network.cc | 8 // This header is introduced to make it easy to switch from chromeos_network.cc |
| 9 // to Chrome's own DBus code. crosbug.com/16557 | 9 // to Chrome's own DBus code. crosbug.com/16557 |
| 10 // All calls to functions in chromeos_network.h should be made through | 10 // All calls to functions in chromeos_network.h should be made through |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CHROMEOS_EXPORT std::string PrefixLengthToNetmask(int32 prefix_length); | 70 CHROMEOS_EXPORT std::string PrefixLengthToNetmask(int32 prefix_length); |
| 71 | 71 |
| 72 // Converts a |netmask| to a prefixlen. (for IPv4 only) | 72 // Converts a |netmask| to a prefixlen. (for IPv4 only) |
| 73 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 | 73 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 |
| 74 CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); | 74 CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); |
| 75 | 75 |
| 76 // Parses |list|, which contains DictionaryValues and returns a vector of | 76 // Parses |list|, which contains DictionaryValues and returns a vector of |
| 77 // CellularScanResult in |scan_results|. Returns false if parsing fails, | 77 // CellularScanResult in |scan_results|. Returns false if parsing fails, |
| 78 // in which case the contents of |scan_results| will be undefined. | 78 // in which case the contents of |scan_results| will be undefined. |
| 79 CHROMEOS_EXPORT bool ParseCellularScanResults( | 79 CHROMEOS_EXPORT bool ParseCellularScanResults( |
| 80 const ListValue& list, std::vector<CellularScanResult>* scan_results); | 80 const base::ListValue& list, std::vector<CellularScanResult>* scan_results); |
| 81 | 81 |
| 82 } // namespace network_util | 82 } // namespace network_util |
| 83 } // namespace chromeos | 83 } // namespace chromeos |
| 84 | 84 |
| 85 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 85 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| OLD | NEW |