| Index: net/base/net_util_win.cc
|
| diff --git a/net/base/net_util_win.cc b/net/base/net_util_win.cc
|
| index 7d146b91e511f2f3ba1c8f213ea90eb2652b3e4b..f089ab2d3bffbe5bac7b56c12a86c44645b3d15b 100644
|
| --- a/net/base/net_util_win.cc
|
| +++ b/net/base/net_util_win.cc
|
| @@ -52,8 +52,7 @@ NetworkChangeNotifier::ConnectionType GetNetworkInterfaceType(DWORD ifType) {
|
|
|
| namespace internal {
|
|
|
| -base::LazyInstance<WlanApi>::Leaky lazy_wlanapi =
|
| - LAZY_INSTANCE_INITIALIZER;
|
| +base::LazyInstance<WlanApi>::Leaky lazy_wlanapi = LAZY_INSTANCE_INITIALIZER;
|
|
|
| WlanApi& WlanApi::GetInstance() {
|
| return lazy_wlanapi.Get();
|
| @@ -81,8 +80,8 @@ WlanApi::WlanApi() : initialized(false) {
|
| close_handle_func = reinterpret_cast<WlanCloseHandleFunc>(
|
| ::GetProcAddress(module, "WlanCloseHandle"));
|
| initialized = open_handle_func && enum_interfaces_func &&
|
| - query_interface_func && set_interface_func &&
|
| - free_memory_func && close_handle_func;
|
| + query_interface_func && set_interface_func &&
|
| + free_memory_func && close_handle_func;
|
| }
|
|
|
| } // namespace internal
|
| @@ -100,8 +99,8 @@ bool GetNetworkList(NetworkInterfaceList* networks, int policy) {
|
| return true;
|
| }
|
| scoped_ptr<char[]> buf(new char[len]);
|
| - IP_ADAPTER_ADDRESSES *adapters =
|
| - reinterpret_cast<IP_ADAPTER_ADDRESSES *>(buf.get());
|
| + IP_ADAPTER_ADDRESSES* adapters =
|
| + reinterpret_cast<IP_ADAPTER_ADDRESSES*>(buf.get());
|
| result = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapters, &len);
|
| if (result != NO_ERROR) {
|
| LOG(ERROR) << "GetAdaptersAddresses failed: " << result;
|
| @@ -113,7 +112,7 @@ bool GetNetworkList(NetworkInterfaceList* networks, int policy) {
|
| ULONG ipv6_valid_lifetime = 0;
|
| scoped_ptr<NetworkInterface> ipv6_address;
|
|
|
| - for (IP_ADAPTER_ADDRESSES *adapter = adapters; adapter != NULL;
|
| + for (IP_ADAPTER_ADDRESSES* adapter = adapters; adapter != NULL;
|
| adapter = adapter->Next) {
|
| // Ignore the loopback device.
|
| if (adapter->IfType == IF_TYPE_SOFTWARE_LOOPBACK) {
|
| @@ -134,7 +133,8 @@ bool GetNetworkList(NetworkInterfaceList* networks, int policy) {
|
| }
|
|
|
| for (IP_ADAPTER_UNICAST_ADDRESS* address = adapter->FirstUnicastAddress;
|
| - address; address = address->Next) {
|
| + address;
|
| + address = address->Next) {
|
| int family = address->Address.lpSockaddr->sa_family;
|
| if (family == AF_INET || family == AF_INET6) {
|
| IPEndPoint endpoint;
|
| @@ -152,7 +152,8 @@ bool GetNetworkList(NetworkInterfaceList* networks, int policy) {
|
| int prefix_family = prefix->Address.lpSockaddr->sa_family;
|
| IPEndPoint network_endpoint;
|
| if (prefix_family == family &&
|
| - network_endpoint.FromSockAddr(prefix->Address.lpSockaddr,
|
| + network_endpoint.FromSockAddr(
|
| + prefix->Address.lpSockaddr,
|
| prefix->Address.iSockaddrLength) &&
|
| IPNumberMatchesPrefix(endpoint.address(),
|
| network_endpoint.address(),
|
| @@ -216,8 +217,8 @@ WifiPHYLayerProtocol GetWifiPHYLayerProtocol() {
|
| return WIFI_PHY_LAYER_PROTOCOL_NONE;
|
|
|
| WLAN_INTERFACE_INFO_LIST* interface_list_ptr = NULL;
|
| - result = wlanapi.enum_interfaces_func(client.Get(), NULL,
|
| - &interface_list_ptr);
|
| + result =
|
| + wlanapi.enum_interfaces_func(client.Get(), NULL, &interface_list_ptr);
|
| if (result != ERROR_SUCCESS)
|
| return WIFI_PHY_LAYER_PROTOCOL_NONE;
|
| scoped_ptr<WLAN_INTERFACE_INFO_LIST, internal::WlanApiDeleter> interface_list(
|
| @@ -239,10 +240,14 @@ WifiPHYLayerProtocol GetWifiPHYLayerProtocol() {
|
| WLAN_CONNECTION_ATTRIBUTES* conn_info_ptr;
|
| DWORD conn_info_size = 0;
|
| WLAN_OPCODE_VALUE_TYPE op_code;
|
| - result = wlanapi.query_interface_func(
|
| - client.Get(), &info->InterfaceGuid, wlan_intf_opcode_current_connection,
|
| - NULL, &conn_info_size, reinterpret_cast<VOID**>(&conn_info_ptr),
|
| - &op_code);
|
| + result =
|
| + wlanapi.query_interface_func(client.Get(),
|
| + &info->InterfaceGuid,
|
| + wlan_intf_opcode_current_connection,
|
| + NULL,
|
| + &conn_info_size,
|
| + reinterpret_cast<VOID**>(&conn_info_ptr),
|
| + &op_code);
|
| if (result != ERROR_SUCCESS)
|
| return WIFI_PHY_LAYER_PROTOCOL_UNKNOWN;
|
| scoped_ptr<WLAN_CONNECTION_ATTRIBUTES, internal::WlanApiDeleter> conn_info(
|
| @@ -280,14 +285,14 @@ class WifiOptionSetter : public ScopedWifiOptions {
|
|
|
| DWORD cur_version = 0;
|
| const DWORD kMaxClientVersion = 2;
|
| - DWORD result = wlanapi.OpenHandle(
|
| - kMaxClientVersion, &cur_version, &client_);
|
| + DWORD result =
|
| + wlanapi.OpenHandle(kMaxClientVersion, &cur_version, &client_);
|
| if (result != ERROR_SUCCESS)
|
| return;
|
|
|
| WLAN_INTERFACE_INFO_LIST* interface_list_ptr = NULL;
|
| - result = wlanapi.enum_interfaces_func(client_.Get(), NULL,
|
| - &interface_list_ptr);
|
| + result =
|
| + wlanapi.enum_interfaces_func(client_.Get(), NULL, &interface_list_ptr);
|
| if (result != ERROR_SUCCESS)
|
| return;
|
| scoped_ptr<WLAN_INTERFACE_INFO_LIST, internal::WlanApiDeleter>
|
|
|