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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_linux.cc

Issue 24041003: Geolocation: move polling policy to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix whitespace. Created 7 years, 3 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 unified diff | Download patch
OLDNEW
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 // Provides wifi scan API binding for suitable for typical linux distributions. 5 // Provides wifi scan API binding for suitable for typical linux distributions.
6 // Currently, only the NetworkManager API is used, accessed via D-Bus (in turn 6 // Currently, only the NetworkManager API is used, accessed via D-Bus (in turn
7 // accessed via the GLib wrapper). 7 // accessed via the GLib wrapper).
8 8
9 #include "content/browser/geolocation/wifi_data_provider_linux.h" 9 #include "content/browser/geolocation/wifi_data_provider_linux.h"
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 WifiDataProviderCommon::WlanApiInterface* 357 WifiDataProviderCommon::WlanApiInterface*
358 WifiDataProviderLinux::NewWlanApi() { 358 WifiDataProviderLinux::NewWlanApi() {
359 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi); 359 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi);
360 if (wlan_api->Init()) 360 if (wlan_api->Init())
361 return wlan_api.release(); 361 return wlan_api.release();
362 return NULL; 362 return NULL;
363 } 363 }
364 364
365 PollingPolicyInterface* WifiDataProviderLinux::NewPollingPolicy() { 365 WifiPollingPolicy* WifiDataProviderLinux::NewPollingPolicy() {
366 return new GenericPollingPolicy<kDefaultPollingIntervalMilliseconds, 366 return new GenericWifiPollingPolicy<kDefaultPollingIntervalMilliseconds,
367 kNoChangePollingIntervalMilliseconds, 367 kNoChangePollingIntervalMilliseconds,
368 kTwoNoChangePollingIntervalMilliseconds, 368 kTwoNoChangePollingIntervalMilliseconds,
369 kNoWifiPollingIntervalMilliseconds>; 369 kNoWifiPollingIntervalMilliseconds>;
370 } 370 }
371 371
372 WifiDataProviderCommon::WlanApiInterface* 372 WifiDataProviderCommon::WlanApiInterface*
373 WifiDataProviderLinux::NewWlanApiForTesting(dbus::Bus* bus) { 373 WifiDataProviderLinux::NewWlanApiForTesting(dbus::Bus* bus) {
374 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi); 374 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi);
375 if (wlan_api->InitWithBus(bus)) 375 if (wlan_api->InitWithBus(bus))
376 return wlan_api.release(); 376 return wlan_api.release();
377 return NULL; 377 return NULL;
378 } 378 }
379 379
380 } // namespace content 380 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_linux.h ('k') | content/browser/geolocation/wifi_data_provider_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698