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

Unified Diff: chrome/browser/chromeos/cros/network_library_impl_cros.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
Index: chrome/browser/chromeos/cros/network_library_impl_cros.h
diff --git a/chrome/browser/chromeos/cros/network_library_impl_cros.h b/chrome/browser/chromeos/cros/network_library_impl_cros.h
index 6c51fd93990808c6ef991176a5e9dd9dcc4a945d..39918fe08917ece0495603b8faecbde0aa8e3024 100644
--- a/chrome/browser/chromeos/cros/network_library_impl_cros.h
+++ b/chrome/browser/chromeos/cros/network_library_impl_cros.h
@@ -71,7 +71,11 @@ class NetworkLibraryImplCros : public NetworkLibraryImplBase {
virtual void EnableOfflineMode(bool enable) OVERRIDE;
- virtual NetworkIPConfigVector GetIPConfigs(
+ virtual void GetIPConfigs(
+ const std::string& device_path,
+ HardwareAddressFormat format,
+ const NetworkGetIPConfigsCallback& callback) OVERRIDE;
+ virtual NetworkIPConfigVector GetIPConfigsAndBlock(
const std::string& device_path,
std::string* hardware_address,
HardwareAddressFormat format) OVERRIDE;
@@ -93,6 +97,11 @@ class NetworkLibraryImplCros : public NetworkLibraryImplBase {
// and notification should be skipped.
bool UpdateCellularDeviceStatus(NetworkDevice* device, PropertyIndex index);
+ void GetIPConfigsCallback(const NetworkGetIPConfigsCallback& callback,
+ HardwareAddressFormat format,
+ const NetworkIPConfigVector& ipconfig_vector,
+ const std::string& hardware_address);
+
void PinOperationCallback(const std::string& path,
NetworkMethodErrorType error,
const std::string& error_message);
@@ -105,23 +114,25 @@ class NetworkLibraryImplCros : public NetworkLibraryImplBase {
NetworkMethodErrorType error,
const std::string& error_message);
- void WifiServiceUpdateAndConnect(const std::string& service_path,
- const base::DictionaryValue* properties);
+ void WifiServiceUpdateAndConnect(
+ const std::string& service_path,
+ scoped_ptr<base::DictionaryValue> properties);
void VPNServiceUpdateAndConnect(const std::string& service_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
void NetworkManagerStatusChangedHandler(const std::string& path,
const std::string& key,
const base::Value& value);
void NetworkManagerUpdate(const std::string& manager_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
void NetworkServiceUpdate(const std::string& service_path,
- const base::DictionaryValue* properties);
- void RememberedNetworkServiceUpdate(const std::string& service_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
+ void RememberedNetworkServiceUpdate(
+ const std::string& service_path,
+ scoped_ptr<base::DictionaryValue> properties);
void NetworkDeviceUpdate(const std::string& device_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
private:
// Structure used to pass IP parameter info to a DoSetIPParameters callback,
@@ -133,12 +144,12 @@ class NetworkLibraryImplCros : public NetworkLibraryImplBase {
// fetch is complete.
void SetIPParametersCallback(const IPParameterInfo& info,
const std::string& service_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
// Second half of refreshing IPConfig for a network. Refreshes all IP config
// paths found in properties.
void RefreshIPConfigCallback(const std::string& device_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
// This processes all Manager update messages.
bool NetworkManagerStatusChanged(const std::string& key, const Value* value);
@@ -157,7 +168,7 @@ class NetworkLibraryImplCros : public NetworkLibraryImplBase {
void UpdateRememberedNetworks(const base::ListValue* profiles);
void RequestRememberedNetworksUpdate();
void UpdateProfile(const std::string& profile_path,
- const base::DictionaryValue* properties);
+ scoped_ptr<base::DictionaryValue> properties);
Network* ParseRememberedNetwork(const std::string& service_path,
const base::DictionaryValue& info);

Powered by Google App Engine
This is Rietveld 408576698