OLD | NEW |
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 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "dbus/bus.h" | 14 #include "dbus/bus.h" |
15 #include "dbus/message.h" | 15 #include "dbus/message.h" |
16 #include "dbus/object_path.h" | 16 #include "dbus/object_path.h" |
17 #include "dbus/object_proxy.h" | 17 #include "dbus/object_proxy.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 namespace { | 20 namespace { |
21 // The time periods between successive polls of the wifi data. | 21 // The time periods between successive polls of the wifi data. |
22 const int kDefaultPollingIntervalMilliseconds = 10 * 1000; // 10s | 22 const int kDefaultPollingIntervalMilliseconds = 10 * 1000; // 10s |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 WifiDataProviderCommon::WlanApiInterface* | 373 WifiDataProviderCommon::WlanApiInterface* |
374 WifiDataProviderLinux::NewWlanApiForTesting(dbus::Bus* bus) { | 374 WifiDataProviderLinux::NewWlanApiForTesting(dbus::Bus* bus) { |
375 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi); | 375 scoped_ptr<NetworkManagerWlanApi> wlan_api(new NetworkManagerWlanApi); |
376 if (wlan_api->InitWithBus(bus)) | 376 if (wlan_api->InitWithBus(bus)) |
377 return wlan_api.release(); | 377 return wlan_api.release(); |
378 return NULL; | 378 return NULL; |
379 } | 379 } |
380 | 380 |
381 } // namespace content | 381 } // namespace content |
OLD | NEW |