diff options
author | mvanouwerkerk@chromium.org <mvanouwerkerk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-18 19:17:53 +0000 |
---|---|---|
committer | mvanouwerkerk@chromium.org <mvanouwerkerk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-18 19:19:09 +0000 |
commit | 458e22efbfd36a69cfc726833073fb16a88fa814 (patch) | |
tree | 47cf7d57d9d27a186889501befb0eac19a1f544b | |
parent | dc33fbbe670b3ff49209b4093e58df07959fcda9 (diff) | |
download | chromium_src-458e22efbfd36a69cfc726833073fb16a88fa814.zip chromium_src-458e22efbfd36a69cfc726833073fb16a88fa814.tar.gz chromium_src-458e22efbfd36a69cfc726833073fb16a88fa814.tar.bz2 |
Rename platform specific wifi data provider classes.
For consistency with the file names, and with WifiDataProviderLinux and WifiDataProviderChromeOS the platform token is a suffix.
Review URL: https://codereview.chromium.org/476133003
Cr-Commit-Position: refs/heads/master@{#290321}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290321 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/geolocation/wifi_data_provider_mac.cc | 14 | ||||
-rw-r--r-- | content/browser/geolocation/wifi_data_provider_mac.h | 8 | ||||
-rw-r--r-- | content/browser/geolocation/wifi_data_provider_win.cc | 14 | ||||
-rw-r--r-- | content/browser/geolocation/wifi_data_provider_win.h | 8 | ||||
-rw-r--r-- | content/browser/geolocation/wifi_data_provider_win_unittest.cc (renamed from content/browser/geolocation/wifi_data_provider_unittest_win.cc) | 8 | ||||
-rw-r--r-- | content/content_tests.gypi | 2 |
6 files changed, 27 insertions, 27 deletions
diff --git a/content/browser/geolocation/wifi_data_provider_mac.cc b/content/browser/geolocation/wifi_data_provider_mac.cc index 6a87801..9c99c28 100644 --- a/content/browser/geolocation/wifi_data_provider_mac.cc +++ b/content/browser/geolocation/wifi_data_provider_mac.cc @@ -160,20 +160,20 @@ bool Apple80211Api::GetAccessPointData(WifiData::AccessPointDataSet* data) { // static WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { - return new MacWifiDataProvider(); + return new WifiDataProviderMac(); } -MacWifiDataProvider::MacWifiDataProvider() { +WifiDataProviderMac::WifiDataProviderMac() { } -MacWifiDataProvider::~MacWifiDataProvider() { +WifiDataProviderMac::~WifiDataProviderMac() { } -MacWifiDataProvider::WlanApiInterface* MacWifiDataProvider::NewWlanApi() { +WifiDataProviderMac::WlanApiInterface* WifiDataProviderMac::NewWlanApi() { // Try and find a API binding that works: first try the officially supported // CoreWLAN API, and if this fails (e.g. on OSX 10.5) fall back to the reverse // engineered Apple80211 API. - MacWifiDataProvider::WlanApiInterface* core_wlan_api = NewCoreWlanApi(); + WifiDataProviderMac::WlanApiInterface* core_wlan_api = NewCoreWlanApi(); if (core_wlan_api) return core_wlan_api; @@ -181,11 +181,11 @@ MacWifiDataProvider::WlanApiInterface* MacWifiDataProvider::NewWlanApi() { if (wlan_api->Init()) return wlan_api.release(); - DVLOG(1) << "MacWifiDataProvider : failed to initialize any wlan api"; + DVLOG(1) << "WifiDataProviderMac : failed to initialize any wlan api"; return NULL; } -WifiPollingPolicy* MacWifiDataProvider::NewPollingPolicy() { +WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() { return new GenericWifiPollingPolicy<kDefaultPollingInterval, kNoChangePollingInterval, kTwoNoChangePollingInterval, diff --git a/content/browser/geolocation/wifi_data_provider_mac.h b/content/browser/geolocation/wifi_data_provider_mac.h index ebb0030..e991648 100644 --- a/content/browser/geolocation/wifi_data_provider_mac.h +++ b/content/browser/geolocation/wifi_data_provider_mac.h @@ -12,18 +12,18 @@ namespace content { // Implementation of the wifi data provider for Mac OSX. Uses different API // bindings depending on APIs detected available at runtime in order to access // wifi scan data: Apple80211.h on OSX 10.5, CoreWLAN framework on OSX 10.6. -class MacWifiDataProvider : public WifiDataProviderCommon { +class WifiDataProviderMac : public WifiDataProviderCommon { public: - MacWifiDataProvider(); + WifiDataProviderMac(); private: - virtual ~MacWifiDataProvider(); + virtual ~WifiDataProviderMac(); // WifiDataProviderCommon virtual WlanApiInterface* NewWlanApi() OVERRIDE; virtual WifiPollingPolicy* NewPollingPolicy() OVERRIDE; - DISALLOW_COPY_AND_ASSIGN(MacWifiDataProvider); + DISALLOW_COPY_AND_ASSIGN(WifiDataProviderMac); }; // Creates and returns a new API binding for the CoreWLAN API, or NULL if the diff --git a/content/browser/geolocation/wifi_data_provider_win.cc b/content/browser/geolocation/wifi_data_provider_win.cc index 9345144..09b3083 100644 --- a/content/browser/geolocation/wifi_data_provider_win.cc +++ b/content/browser/geolocation/wifi_data_provider_win.cc @@ -43,7 +43,7 @@ namespace { const int kInitialBufferSize = 2 << 12; // Good for about 50 APs. const int kMaximumBufferSize = 2 << 20; // 2MB -// Length for generic string buffers passed to Win32 APIs. +// Length for generic string buffers passed to Windows APIs. const int kStringLength = 512; // The time periods, in milliseconds, between successive polls of the wifi data. @@ -147,7 +147,7 @@ bool GetNetworkData(const WLAN_BSS_ENTRY& bss_entry, bool UndefineDosDevice(const base::string16& device_name); bool DefineDosDeviceIfNotExists(const base::string16& device_name); HANDLE GetFileHandle(const base::string16& device_name); -// Makes the OID query and returns a Win32 error code. +// Makes the OID query and returns a Windows API error code. int PerformQuery(HANDLE adapter_handle, BYTE* buffer, DWORD buffer_size, @@ -160,16 +160,16 @@ bool GetSystemDirectory(base::string16* path); } // namespace WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { - return new Win32WifiDataProvider(); + return new WifiDataProviderWin(); } -Win32WifiDataProvider::Win32WifiDataProvider() { +WifiDataProviderWin::WifiDataProviderWin() { } -Win32WifiDataProvider::~Win32WifiDataProvider() { +WifiDataProviderWin::~WifiDataProviderWin() { } -WifiDataProviderCommon::WlanApiInterface* Win32WifiDataProvider::NewWlanApi() { +WifiDataProviderCommon::WlanApiInterface* WifiDataProviderWin::NewWlanApi() { // Use the WLAN interface if we're on Vista and if it's available. Otherwise, // use NDIS. WlanApiInterface* api = WindowsWlanApi::Create(); @@ -179,7 +179,7 @@ WifiDataProviderCommon::WlanApiInterface* Win32WifiDataProvider::NewWlanApi() { return WindowsNdisApi::Create(); } -WifiPollingPolicy* Win32WifiDataProvider::NewPollingPolicy() { +WifiPollingPolicy* WifiDataProviderWin::NewPollingPolicy() { return new GenericWifiPollingPolicy<kDefaultPollingInterval, kNoChangePollingInterval, kTwoNoChangePollingInterval, diff --git a/content/browser/geolocation/wifi_data_provider_win.h b/content/browser/geolocation/wifi_data_provider_win.h index c39bd58..d67798d57 100644 --- a/content/browser/geolocation/wifi_data_provider_win.h +++ b/content/browser/geolocation/wifi_data_provider_win.h @@ -10,18 +10,18 @@ namespace content { -class CONTENT_EXPORT Win32WifiDataProvider : public WifiDataProviderCommon { +class CONTENT_EXPORT WifiDataProviderWin : public WifiDataProviderCommon { public: - Win32WifiDataProvider(); + WifiDataProviderWin(); private: - virtual ~Win32WifiDataProvider(); + virtual ~WifiDataProviderWin(); // WifiDataProviderCommon virtual WlanApiInterface* NewWlanApi(); virtual WifiPollingPolicy* NewPollingPolicy(); - DISALLOW_COPY_AND_ASSIGN(Win32WifiDataProvider); + DISALLOW_COPY_AND_ASSIGN(WifiDataProviderWin); }; } // namespace content diff --git a/content/browser/geolocation/wifi_data_provider_unittest_win.cc b/content/browser/geolocation/wifi_data_provider_win_unittest.cc index c74f42c..cb3c21c 100644 --- a/content/browser/geolocation/wifi_data_provider_unittest_win.cc +++ b/content/browser/geolocation/wifi_data_provider_win_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,13 +10,13 @@ namespace content { -TEST(GeolocationWin32WifiDataProviderTest, CreateDestroy) { +TEST(GeolocationWifiDataProviderWinTest, CreateDestroy) { // WifiDataProviderCommon requires the client to have a message loop. base::MessageLoop dummy_loop; - scoped_refptr<Win32WifiDataProvider> instance(new Win32WifiDataProvider); + scoped_refptr<WifiDataProviderWin> instance(new WifiDataProviderWin); instance = NULL; SUCCEED(); - // Can't actually call start provider on the Win32WifiDataProvider without + // Can't actually call start provider on the WifiDataProviderWin without // it accessing hardware and so risking making the test flaky. } diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 94bbcee..f2f737c 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -491,7 +491,7 @@ 'browser/geolocation/wifi_data_provider_chromeos_unittest.cc', 'browser/geolocation/wifi_data_provider_common_unittest.cc', 'browser/geolocation/wifi_data_provider_linux_unittest.cc', - 'browser/geolocation/wifi_data_provider_unittest_win.cc', + 'browser/geolocation/wifi_data_provider_win_unittest.cc', 'browser/gpu/gpu_data_manager_impl_private_unittest.cc', 'browser/gpu/shader_disk_cache_unittest.cc', 'browser/host_zoom_map_impl_unittest.cc', |