| Index: content/browser/geolocation/wifi_data_provider_linux.cc
|
| diff --git a/content/browser/geolocation/wifi_data_provider_linux.cc b/content/browser/geolocation/wifi_data_provider_linux.cc
|
| index 178260af2e7d8de5dfd6168c654fd14e734a7137..11c2a940e025faa254e35dd5b1bbf3ade1d6e2ff 100644
|
| --- a/content/browser/geolocation/wifi_data_provider_linux.cc
|
| +++ b/content/browser/geolocation/wifi_data_provider_linux.cc
|
| @@ -13,6 +13,7 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "dbus/bus.h"
|
| #include "dbus/message.h"
|
| +#include "dbus/object_path.h"
|
| #include "dbus/object_proxy.h"
|
|
|
| namespace {
|
| @@ -56,12 +57,12 @@ class NetworkManagerWlanApi : public WifiDataProviderCommon::WlanApiInterface {
|
| private:
|
| // Enumerates the list of available network adapter devices known to
|
| // NetworkManager. Return true on success.
|
| - bool GetAdapterDeviceList(std::vector<std::string>* device_paths);
|
| + bool GetAdapterDeviceList(std::vector<dbus::ObjectPath>* device_paths);
|
|
|
| // Given the NetworkManager path to a wireless adapater, dumps the wifi scan
|
| // results and appends them to |data|. Returns false if a fatal error is
|
| // encountered such that the data set could not be populated.
|
| - bool GetAccessPointsForAdapter(const std::string& adapter_path,
|
| + bool GetAccessPointsForAdapter(const dbus::ObjectPath& adapter_path,
|
| WifiData::AccessPointDataSet* data);
|
|
|
| // Internal method used by |GetAccessPointsForAdapter|, given a wifi access
|
| @@ -112,7 +113,7 @@ bool NetworkManagerWlanApi::InitWithBus(dbus::Bus* bus) {
|
| system_bus_->GetObjectProxy(kNetworkManagerServiceName,
|
| kNetworkManagerPath);
|
| // Validate the proxy object by checking we can enumerate devices.
|
| - std::vector<std::string> adapter_paths;
|
| + std::vector<dbus::ObjectPath> adapter_paths;
|
| const bool success = GetAdapterDeviceList(&adapter_paths);
|
| VLOG(1) << "Init() result: " << success;
|
| return success;
|
| @@ -120,7 +121,7 @@ bool NetworkManagerWlanApi::InitWithBus(dbus::Bus* bus) {
|
|
|
| bool NetworkManagerWlanApi::GetAccessPointData(
|
| WifiData::AccessPointDataSet* data) {
|
| - std::vector<std::string> device_paths;
|
| + std::vector<dbus::ObjectPath> device_paths;
|
| if (!GetAdapterDeviceList(&device_paths)) {
|
| LOG(WARNING) << "Could not enumerate access points";
|
| return false;
|
| @@ -130,7 +131,7 @@ bool NetworkManagerWlanApi::GetAccessPointData(
|
|
|
| // Iterate the devices, getting APs for each wireless adapter found
|
| for (size_t i = 0; i < device_paths.size(); ++i) {
|
| - const std::string& device_path = device_paths[i];
|
| + const dbus::ObjectPath& device_path = device_paths[i];
|
| VLOG(1) << "Checking device: " << device_path;
|
|
|
| dbus::ObjectProxy* device_proxy =
|
| @@ -170,7 +171,7 @@ bool NetworkManagerWlanApi::GetAccessPointData(
|
| }
|
|
|
| bool NetworkManagerWlanApi::GetAdapterDeviceList(
|
| - std::vector<std::string>* device_paths) {
|
| + std::vector<dbus::ObjectPath>* device_paths) {
|
| dbus::MethodCall method_call(kNetworkManagerInterface, "GetDevices");
|
| scoped_ptr<dbus::Response> response(
|
| network_manager_proxy_->CallMethodAndBlock(
|
| @@ -191,7 +192,7 @@ bool NetworkManagerWlanApi::GetAdapterDeviceList(
|
|
|
|
|
| bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
|
| - const std::string& adapter_path, WifiData::AccessPointDataSet* data) {
|
| + const dbus::ObjectPath& adapter_path, WifiData::AccessPointDataSet* data) {
|
| // Create a proxy object for this wifi adapter, and ask it to do a scan
|
| // (or at least, dump its scan results).
|
| dbus::ObjectProxy* device_proxy =
|
| @@ -209,7 +210,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
|
| return false;
|
| }
|
| dbus::MessageReader reader(response.get());
|
| - std::vector<std::string> access_point_paths;
|
| + std::vector<dbus::ObjectPath> access_point_paths;
|
| if (!reader.PopArrayOfObjectPaths(&access_point_paths)) {
|
| LOG(WARNING) << "Unexpected response for " << adapter_path << ": "
|
| << response->ToString();
|
| @@ -220,7 +221,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
|
| << access_point_paths.size() << " access points.";
|
|
|
| for (size_t i = 0; i < access_point_paths.size(); ++i) {
|
| - const std::string& access_point_path = access_point_paths[i];
|
| + const dbus::ObjectPath& access_point_path = access_point_paths[i];
|
| VLOG(1) << "Checking access point: " << access_point_path;
|
|
|
| dbus::ObjectProxy* access_point_proxy =
|
|
|