OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See | 5 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See |
6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP | 6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP |
7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix) | 7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix) |
8 // also support a limited version of the WLAN API. See | 8 // also support a limited version of the WLAN API. See |
9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses | 9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses |
10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated | 10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated |
(...skipping 10 matching lines...) Expand all Loading... |
21 // not to work on XP SP3. So we use WLAN on Vista, and use NDIS directly | 21 // not to work on XP SP3. So we use WLAN on Vista, and use NDIS directly |
22 // otherwise. | 22 // otherwise. |
23 | 23 |
24 #include "content/browser/geolocation/wifi_data_provider_win.h" | 24 #include "content/browser/geolocation/wifi_data_provider_win.h" |
25 | 25 |
26 #include <windows.h> | 26 #include <windows.h> |
27 #include <winioctl.h> | 27 #include <winioctl.h> |
28 #include <wlanapi.h> | 28 #include <wlanapi.h> |
29 | 29 |
30 #include "base/metrics/histogram.h" | 30 #include "base/metrics/histogram.h" |
31 #include "base/utf_string_conversions.h" | 31 #include "base/strings/utf_string_conversions.h" |
32 #include "base/win/windows_version.h" | 32 #include "base/win/windows_version.h" |
33 #include "content/browser/geolocation/wifi_data_provider_common.h" | 33 #include "content/browser/geolocation/wifi_data_provider_common.h" |
34 #include "content/browser/geolocation/wifi_data_provider_common_win.h" | 34 #include "content/browser/geolocation/wifi_data_provider_common_win.h" |
35 | 35 |
36 // Taken from ndis.h for WinCE. | 36 // Taken from ndis.h for WinCE. |
37 #define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L) | 37 #define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L) |
38 #define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L) | 38 #define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L) |
39 | 39 |
40 namespace content { | 40 namespace content { |
41 namespace { | 41 namespace { |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 631 |
632 if (*path->rbegin() != L'\\') { | 632 if (*path->rbegin() != L'\\') { |
633 path->append(L"\\"); | 633 path->append(L"\\"); |
634 } | 634 } |
635 DCHECK_EQ(L'\\', *path->rbegin()); | 635 DCHECK_EQ(L'\\', *path->rbegin()); |
636 return true; | 636 return true; |
637 } | 637 } |
638 } // namespace | 638 } // namespace |
639 | 639 |
640 } // namespace content | 640 } // namespace content |
OLD | NEW |