Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: chrome/browser/geolocation/wifi_data_provider_chromeos.cc

Issue 10535157: [WIP] attempt to allow chrome OS to inject its wifi data provider (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_radio
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/DEPS ('k') | content/browser/geolocation/device_data_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/wifi_data_provider_chromeos.cc
diff --git a/chrome/browser/geolocation/wifi_data_provider_chromeos.cc b/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
index a415c66e587efc36760b865186765e221b0983c8..0ab77ba47af7b39df78308a03c7994dee32872ee 100644
--- a/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
@@ -14,6 +14,7 @@
using content::BrowserThread;
+namespace chromeos {
namespace {
// The time periods between successive polls of the wifi data.
const int kDefaultPollingIntervalMilliseconds = 10 * 1000; // 10s
@@ -21,25 +22,6 @@ const int kNoChangePollingIntervalMilliseconds = 2 * 60 * 1000; // 2 mins
const int kTwoNoChangePollingIntervalMilliseconds = 10 * 60 * 1000; // 10 mins
const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s
-WifiDataProviderImplBase* ChromeOSFactoryFunction() {
- return new WifiDataProviderChromeOs();
-}
-
-// This global class forces code that links in this file to use that as a data
-// provider instead of the default Linux provider.
-class RegisterChromeOSWifiDataProvider {
- public:
- RegisterChromeOSWifiDataProvider() {
- WifiDataProvider::SetFactory(ChromeOSFactoryFunction);
- }
-};
-
-RegisterChromeOSWifiDataProvider g_force_chrome_os_provider;
-
-} // namespace
-
-namespace chromeos {
-namespace {
// Wifi API binding to network_library.h, to allow reuse of the polling behavior
// defined in WifiDataProviderCommon.
class NetworkLibraryWlanApi : public WifiDataProviderCommon::WlanApiInterface {
@@ -239,3 +221,7 @@ void WifiDataProviderChromeOs::ScheduleStart() {
FROM_HERE,
base::Bind(&WifiDataProviderChromeOs::DoStartTaskOnUIThread, this));
}
+
+WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
+ return new WifiDataProviderChromeOs();
+}
« no previous file with comments | « chrome/browser/DEPS ('k') | content/browser/geolocation/device_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698