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

Unified Diff: chromeos/dbus/shill_device_client.cc

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: chromeos/dbus/shill_device_client.cc
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index 39ca916bebb16c1d2713e5300ae9ce930dadf04c..e758730358cd25394f7b4b9536bfceafd85ab549 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -399,11 +399,14 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient,
const base::DictionaryValue* device_properties = NULL;
if (!stub_devices_.GetDictionaryWithoutPathExpansion(
device_path.value(), &device_properties)) {
- base::DictionaryValue empty_dictionary;
- callback.Run(DBUS_METHOD_CALL_FAILURE, empty_dictionary);
+ scoped_ptr<base::DictionaryValue> empty_dictionary(
+ new base::DictionaryValue);
+ callback.Run(DBUS_METHOD_CALL_FAILURE, empty_dictionary.Pass());
return;
}
- callback.Run(DBUS_METHOD_CALL_SUCCESS, *device_properties);
+ scoped_ptr<base::DictionaryValue> properties_copy(
+ device_properties->DeepCopy());
+ callback.Run(DBUS_METHOD_CALL_SUCCESS, properties_copy.Pass());
}
// Posts a task to run a void callback with status code |status|.

Powered by Google App Engine
This is Rietveld 408576698