Chromium Code Reviews| Index: chrome/browser/chromeos/cros/network_library.h |
| diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h |
| index 5834154f73720d26cc3f80d448f8539b860a444b..fdfc03207985df23d9037d6835163ff7a421dad1 100644 |
| --- a/chrome/browser/chromeos/cros/network_library.h |
| +++ b/chrome/browser/chromeos/cros/network_library.h |
| @@ -602,8 +602,14 @@ class Network { |
| // Set the profile path and update the flimfalm property. |
| void SetProfilePath(const std::string& profile_path); |
| - // Initialize the IP address field |
| + // Trigger an asynchronous initialization the IP address field. |
| void InitIPAddress(); |
| + // Initialize the IP address field. Static so we can avoid a weak pointer |
| + // factory in Network. |
| + static void InitIPAddressCallback( |
| + const std::string& device_path, |
| + const NetworkIPConfigVector& ip_configs, |
| + const std::string& hardware_address); |
|
stevenjb
2012/11/12 20:40:45
Does this get used outside of the .cc file? i.e. c
Greg Spencer (Chromium)
2012/11/12 20:56:03
No, it doesn't get used outside of the .cc file, b
stevenjb
2012/11/12 21:17:27
Fair enough. I think that I regret that we used th
Greg Spencer (Chromium)
2012/11/12 21:39:35
Agreed, on both counts. We won't repeat that patt
|
| // Priority value, corresponds to index in list from shill (0 = first) |
| int priority_order_; |
| @@ -1208,9 +1214,6 @@ class WimaxNetwork : public WirelessNetwork { |
| std::string eap_identity_; |
| std::string eap_passphrase_; |
| - // Weak pointer factory for wrapping pointers to this network in callbacks. |
| - base::WeakPtrFactory<WimaxNetwork> weak_pointer_factory_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(WimaxNetwork); |
| }; |
| @@ -1691,11 +1694,18 @@ class NetworkLibrary { |
| // Enables/disables offline mode. |
| virtual void EnableOfflineMode(bool enable) = 0; |
| - // Fetches IP configs and hardware address for a given device_path. |
| - // The hardware address is usually a MAC address like "0011AA22BB33". |
| + // Fetches IP configs and hardware address for a given device_path and returns |
| + // them via the given callback. |
| + virtual void GetIPConfigs(const std::string& device_path, |
| + HardwareAddressFormat format, |
| + const NetworkGetIPConfigsCallback& callback) = 0; |
| + |
| + // DEPRECATED: DO NOT USE. Instead, use the asynchronous GetIPConfigs above. |
| + // Fetches IP configs and hardware address for a given device_path. The |
| + // hardware address is usually a MAC address like "0011AA22BB33". |
| // |hardware_address| will be an empty string, if no hardware address is |
| // found. |
| - virtual NetworkIPConfigVector GetIPConfigs( |
| + virtual NetworkIPConfigVector GetIPConfigsAndBlock( |
| const std::string& device_path, |
| std::string* hardware_address, |
| HardwareAddressFormat) = 0; |