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

Unified Diff: chrome/browser/chromeos/cros/network_library.h

Issue 11367048: This is the first pass at making GetIPConfigs asynchronous. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/network_ip_config.h ('k') | chrome/browser/chromeos/cros/network_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93b1286d6867d5aa393913bf7374a5b9eb1b11bc 100644
--- a/chrome/browser/chromeos/cros/network_library.h
+++ b/chrome/browser/chromeos/cros/network_library.h
@@ -580,6 +580,18 @@ class Network {
ui_data_.set_certificate_type(type);
}
+ // Set the profile path and update the flimflam property.
+ void SetProfilePath(const std::string& profile_path);
+
+ // Trigger an asynchronous initialization the IP address field.
+ void InitIPAddress();
+
+ // Initialize the IP address field.
+ static void InitIPAddressCallback(
+ const std::string& service_path,
+ const NetworkIPConfigVector& ip_configs,
+ const std::string& hardware_address);
+
std::string device_path_;
std::string name_;
std::string ip_address_;
@@ -599,12 +611,6 @@ class Network {
// Unique identifier, set the first time the network is parsed.
std::string unique_id_;
- // Set the profile path and update the flimfalm property.
- void SetProfilePath(const std::string& profile_path);
-
- // Initialize the IP address field
- void InitIPAddress();
-
// 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;
« no previous file with comments | « chrome/browser/chromeos/cros/network_ip_config.h ('k') | chrome/browser/chromeos/cros/network_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698