| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ |
| 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 13 #include "base/macros.h" |
| 11 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 12 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 13 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 14 #include "components/keyed_service/core/keyed_service.h" | 17 #include "components/keyed_service/core/keyed_service.h" |
| 15 #include "extensions/browser/api/networking_private/networking_private_delegate.
h" | 18 #include "extensions/browser/api/networking_private/networking_private_delegate.
h" |
| 16 | 19 |
| 17 namespace content { | 20 namespace content { |
| 18 class BrowserContext; | 21 class BrowserContext; |
| 19 } | 22 } |
| 20 | 23 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 const std::string& property_name); | 208 const std::string& property_name); |
| 206 | 209 |
| 207 // If the access_point is not already in the map it is added. Otherwise | 210 // If the access_point is not already in the map it is added. Otherwise |
| 208 // the access point is updated (eg. with the max of the signal | 211 // the access point is updated (eg. with the max of the signal |
| 209 // strength). | 212 // strength). |
| 210 void AddOrUpdateAccessPoint(NetworkMap* network_map, | 213 void AddOrUpdateAccessPoint(NetworkMap* network_map, |
| 211 const std::string& network_guid, | 214 const std::string& network_guid, |
| 212 scoped_ptr<base::DictionaryValue>& access_point); | 215 scoped_ptr<base::DictionaryValue>& access_point); |
| 213 | 216 |
| 214 // Maps the WPA security flags to a human readable string. | 217 // Maps the WPA security flags to a human readable string. |
| 215 void MapSecurityFlagsToString(uint32 securityFlags, std::string* security); | 218 void MapSecurityFlagsToString(uint32_t securityFlags, std::string* security); |
| 216 | 219 |
| 217 // Gets the connected access point path on the given device. Internally gets | 220 // Gets the connected access point path on the given device. Internally gets |
| 218 // all active connections then checks if the device matches the requested | 221 // all active connections then checks if the device matches the requested |
| 219 // device, then gets the access point associated with the connection. | 222 // device, then gets the access point associated with the connection. |
| 220 // Returns false if there is an error getting the connected access point. | 223 // Returns false if there is an error getting the connected access point. |
| 221 bool GetConnectedAccessPoint(dbus::ObjectPath device_path, | 224 bool GetConnectedAccessPoint(dbus::ObjectPath device_path, |
| 222 dbus::ObjectPath* access_point_path); | 225 dbus::ObjectPath* access_point_path); |
| 223 | 226 |
| 224 // Given a path to an active connection gets the path to the device | 227 // Given a path to an active connection gets the path to the device |
| 225 // that the connection belongs to. Returns false if there is an error getting | 228 // that the connection belongs to. Returns false if there is an error getting |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // Observers to Network Events. | 274 // Observers to Network Events. |
| 272 base::ObserverList<NetworkingPrivateDelegateObserver> | 275 base::ObserverList<NetworkingPrivateDelegateObserver> |
| 273 network_events_observers_; | 276 network_events_observers_; |
| 274 | 277 |
| 275 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateLinux); | 278 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateLinux); |
| 276 }; | 279 }; |
| 277 | 280 |
| 278 } // namespace extensions | 281 } // namespace extensions |
| 279 | 282 |
| 280 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ | 283 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_LINUX_H_ |
| OLD | NEW |